Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
bbbf15cd
Commit
bbbf15cd
authored
Feb 24, 2018
by
nanahira
Committed by
mercury233
Feb 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix watch swap (#2085)
parent
d530ec2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
gframe/client_field.cpp
gframe/client_field.cpp
+1
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+7
-0
gframe/game.h
gframe/game.h
+1
-0
No files found.
gframe/client_field.cpp
View file @
bbbf15cd
...
...
@@ -645,6 +645,7 @@ void ClientField::ReplaySwap() {
(
*
cit
)
->
is_moving
=
false
;
}
mainGame
->
dInfo
.
isFirst
=
!
mainGame
->
dInfo
.
isFirst
;
mainGame
->
dInfo
.
isReplaySwapped
=
!
mainGame
->
dInfo
.
isReplaySwapped
;
std
::
swap
(
mainGame
->
dInfo
.
lp
[
0
],
mainGame
->
dInfo
.
lp
[
1
]);
std
::
swap
(
mainGame
->
dInfo
.
strLP
[
0
],
mainGame
->
dInfo
.
strLP
[
1
]);
std
::
swap
(
mainGame
->
dInfo
.
hostname
,
mainGame
->
dInfo
.
clientname
);
...
...
gframe/duelclient.cpp
View file @
bbbf15cd
...
...
@@ -562,6 +562,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
dInfo
.
time_left
[
0
]
=
0
;
mainGame
->
dInfo
.
time_left
[
1
]
=
0
;
mainGame
->
dInfo
.
time_player
=
2
;
mainGame
->
dInfo
.
isReplaySwapped
=
false
;
mainGame
->
is_building
=
false
;
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wInfos
->
setVisible
(
true
);
...
...
@@ -1050,6 +1051,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
Initial
(
mainGame
->
LocalPlayer
(
1
),
deckc
,
extrac
);
mainGame
->
dInfo
.
turn
=
0
;
mainGame
->
dInfo
.
is_shuffling
=
false
;
if
(
mainGame
->
dInfo
.
isReplaySwapped
)
{
std
::
swap
(
mainGame
->
dInfo
.
hostname
,
mainGame
->
dInfo
.
clientname
);
std
::
swap
(
mainGame
->
dInfo
.
hostname_tag
,
mainGame
->
dInfo
.
clientname_tag
);
mainGame
->
dInfo
.
isReplaySwapped
=
false
;
mainGame
->
dField
.
ReplaySwap
();
}
mainGame
->
gMutex
.
Unlock
();
return
true
;
}
...
...
gframe/game.h
View file @
bbbf15cd
...
...
@@ -67,6 +67,7 @@ struct DuelInfo {
unsigned
char
time_player
;
unsigned
short
time_limit
;
unsigned
short
time_left
[
2
];
bool
isReplaySwapped
;
};
struct
BotInfo
{
...
...
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