Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro
Commits
2cc2ad72
Commit
2cc2ad72
authored
Nov 17, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test +1s
parent
0d1850d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
0 deletions
+31
-0
gframe/single_duel.cpp
gframe/single_duel.cpp
+14
-0
gframe/single_duel.h
gframe/single_duel.h
+1
-0
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+15
-0
gframe/tag_duel.h
gframe/tag_duel.h
+1
-0
No files found.
gframe/single_duel.cpp
View file @
2cc2ad72
...
...
@@ -699,6 +699,10 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
while
(
pbuf
-
msgbuffer
<
(
int
)
len
)
{
offset
=
pbuf
;
unsigned
char
engType
=
BufferIO
::
ReadUInt8
(
pbuf
);
#ifdef YGOPRO_SERVER_MODE
if
(
engType
!=
MSG_RETRY
)
curMsg
=
engType
;
#endif
switch
(
engType
)
{
case
MSG_RETRY
:
{
WaitforResponse
(
last_response
);
...
...
@@ -1731,6 +1735,16 @@ void SingleDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) {
else
time_limit
[
dp
->
type
]
=
0
;
event_del
(
etimer
);
}
#ifdef YGOPRO_SERVER_MODE
if
(
len
>=
4
&&
time_limit
[
dp
->
type
]
<
host_info
.
time_limit
)
{
int
resp
=
*
(
int
*
)
pdata
;
if
((
curMsg
==
MSG_SELECT_IDLECMD
&&
(
resp
&
0xffff
)
!=
8
)
||
(
curMsg
==
MSG_SELECT_BATTLECMD
)
||
(
curMsg
==
MSG_SELECT_CHAIN
&&
resp
!=
-
1
)
)
++
time_limit
[
dp
->
type
];
}
#endif
Process
();
}
void
SingleDuel
::
EndDuel
()
{
...
...
gframe/single_duel.h
View file @
2cc2ad72
...
...
@@ -68,6 +68,7 @@ protected:
DuelPlayer
*
replay_recorder
;
unsigned
char
turn_player
;
unsigned
short
phase
;
unsigned
char
curMsg
;
#endif
Replay
last_replay
;
bool
match_mode
;
...
...
gframe/tag_duel.cpp
View file @
2cc2ad72
...
...
@@ -639,6 +639,10 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
while
(
pbuf
-
msgbuffer
<
(
int
)
len
)
{
offset
=
pbuf
;
unsigned
char
engType
=
BufferIO
::
ReadUInt8
(
pbuf
);
#ifdef YGOPRO_SERVER_MODE
if
(
engType
!=
MSG_RETRY
)
curMsg
=
engType
;
#endif
switch
(
engType
)
{
case
MSG_RETRY
:
{
WaitforResponse
(
last_response
);
...
...
@@ -1800,6 +1804,17 @@ void TagDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) {
else
time_limit
[
resp_type
]
=
0
;
event_del
(
etimer
);
}
#ifdef YGOPRO_SERVER_MODE
int
resp_type
=
dp
->
type
<
2
?
0
:
1
;
if
(
len
>=
4
&&
time_limit
[
resp_type
]
<
host_info
.
time_limit
)
{
int
resp
=
*
(
int
*
)
pdata
;
if
((
curMsg
==
MSG_SELECT_IDLECMD
&&
(
resp
&
0xffff
)
!=
8
)
||
(
curMsg
==
MSG_SELECT_BATTLECMD
)
||
(
curMsg
==
MSG_SELECT_CHAIN
&&
resp
!=
-
1
)
)
++
time_limit
[
resp_type
];
}
#endif
Process
();
}
void
TagDuel
::
EndDuel
()
{
...
...
gframe/tag_duel.h
View file @
2cc2ad72
...
...
@@ -64,6 +64,7 @@ protected:
DuelPlayer
*
replay_recorder
;
int
turn_player
;
int
phase
;
unsigned
char
curMsg
;
#endif
bool
ready
[
4
];
Deck
pdeck
[
4
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment