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
4218cf36
Commit
4218cf36
authored
May 20, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tag timer
parent
fd4817f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+12
-4
No files found.
gframe/tag_duel.cpp
View file @
4218cf36
...
...
@@ -492,6 +492,11 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
RefreshExtra
(
0
);
RefreshExtra
(
1
);
start_duel
(
pduel
,
opt
);
if
(
host_info
.
time_limit
)
{
time_elapsed
=
0
;
timeval
timeout
=
{
1
,
0
};
event_add
(
etimer
,
&
timeout
);
}
Process
();
}
void
TagDuel
::
Process
()
{
...
...
@@ -1503,7 +1508,7 @@ void TagDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) {
if
(
time_limit
[
resp_type
]
>=
time_elapsed
)
time_limit
[
resp_type
]
-=
time_elapsed
;
else
time_limit
[
resp_type
]
=
0
;
event_del
(
etimer
)
;
time_elapsed
=
0
;
}
Process
();
}
...
...
@@ -1522,6 +1527,7 @@ void TagDuel::EndDuel() {
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
end_duel
(
pduel
);
event_del
(
etimer
);
pduel
=
0
;
}
void
TagDuel
::
WaitforResponse
(
int
playerid
)
{
...
...
@@ -1548,9 +1554,8 @@ void TagDuel::TimeConfirm(DuelPlayer* dp) {
if
(
dp
!=
cur_player
[
last_response
])
return
;
cur_player
[
last_response
]
->
state
=
CTOS_RESPONSE
;
time_elapsed
=
0
;
timeval
timeout
=
{
1
,
0
};
event_add
(
etimer
,
&
timeout
);
if
(
time_elapsed
<
10
)
time_elapsed
=
0
;
}
void
TagDuel
::
RefreshMzone
(
int
player
,
int
flag
,
int
use_cache
)
{
char
query_buffer
[
0x4000
];
...
...
@@ -1712,7 +1717,10 @@ void TagDuel::TagTimer(evutil_socket_t fd, short events, void* arg) {
sd
->
EndDuel
();
sd
->
DuelEndProc
();
event_del
(
sd
->
etimer
);
return
;
}
timeval
timeout
=
{
1
,
0
};
event_add
(
sd
->
etimer
,
&
timeout
);
}
}
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