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
YGOPRO-520DIY
ygopro
Commits
4dbad925
Commit
4dbad925
authored
Jul 11, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix time limit 65535
parent
e54a2b33
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_duel.h
gframe/single_duel.h
+3
-3
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
gframe/tag_duel.h
gframe/tag_duel.h
+3
-3
No files found.
gframe/single_duel.cpp
View file @
4dbad925
...
@@ -2179,7 +2179,7 @@ int SingleDuel::MessageHandler(long fduel, int type) {
...
@@ -2179,7 +2179,7 @@ int SingleDuel::MessageHandler(long fduel, int type) {
void
SingleDuel
::
SingleTimer
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
void
SingleDuel
::
SingleTimer
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
SingleDuel
*
sd
=
static_cast
<
SingleDuel
*>
(
arg
);
SingleDuel
*
sd
=
static_cast
<
SingleDuel
*>
(
arg
);
sd
->
time_elapsed
++
;
sd
->
time_elapsed
++
;
if
(
sd
->
time_elapsed
>=
sd
->
time_limit
[
sd
->
last_response
])
{
if
(
sd
->
time_elapsed
>=
sd
->
time_limit
[
sd
->
last_response
]
||
sd
->
time_limit
[
sd
->
last_response
]
<=
0
)
{
unsigned
char
wbuf
[
3
];
unsigned
char
wbuf
[
3
];
uint32
player
=
sd
->
last_response
;
uint32
player
=
sd
->
last_response
;
wbuf
[
0
]
=
MSG_WIN
;
wbuf
[
0
]
=
MSG_WIN
;
...
...
gframe/single_duel.h
View file @
4dbad925
...
@@ -74,10 +74,10 @@ protected:
...
@@ -74,10 +74,10 @@ protected:
unsigned
char
duel_count
;
unsigned
char
duel_count
;
unsigned
char
tp_player
;
unsigned
char
tp_player
;
unsigned
char
match_result
[
3
];
unsigned
char
match_result
[
3
];
unsigned
short
time_limit
[
2
];
short
time_limit
[
2
];
unsigned
short
time_elapsed
;
short
time_elapsed
;
#ifdef YGOPRO_SERVER_MODE
#ifdef YGOPRO_SERVER_MODE
unsigned
short
time_compensator
[
2
];
short
time_compensator
[
2
];
#endif
#endif
};
};
...
...
gframe/tag_duel.cpp
View file @
4dbad925
...
@@ -2308,7 +2308,7 @@ int TagDuel::MessageHandler(long fduel, int type) {
...
@@ -2308,7 +2308,7 @@ int TagDuel::MessageHandler(long fduel, int type) {
void
TagDuel
::
TagTimer
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
void
TagDuel
::
TagTimer
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
TagDuel
*
sd
=
static_cast
<
TagDuel
*>
(
arg
);
TagDuel
*
sd
=
static_cast
<
TagDuel
*>
(
arg
);
sd
->
time_elapsed
++
;
sd
->
time_elapsed
++
;
if
(
sd
->
time_elapsed
>=
sd
->
time_limit
[
sd
->
last_response
])
{
if
(
sd
->
time_elapsed
>=
sd
->
time_limit
[
sd
->
last_response
]
||
sd
->
time_limit
[
sd
->
last_response
]
<=
0
)
{
unsigned
char
wbuf
[
3
];
unsigned
char
wbuf
[
3
];
uint32
player
=
sd
->
last_response
;
uint32
player
=
sd
->
last_response
;
wbuf
[
0
]
=
MSG_WIN
;
wbuf
[
0
]
=
MSG_WIN
;
...
...
gframe/tag_duel.h
View file @
4dbad925
...
@@ -71,10 +71,10 @@ protected:
...
@@ -71,10 +71,10 @@ protected:
unsigned
char
last_response
;
unsigned
char
last_response
;
Replay
last_replay
;
Replay
last_replay
;
unsigned
char
turn_count
;
unsigned
char
turn_count
;
unsigned
short
time_limit
[
2
];
short
time_limit
[
2
];
unsigned
short
time_elapsed
;
short
time_elapsed
;
#ifdef YGOPRO_SERVER_MODE
#ifdef YGOPRO_SERVER_MODE
unsigned
short
time_compensator
[
2
];
short
time_compensator
[
2
];
#endif
#endif
};
};
...
...
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