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
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
Commits
b3940207
Commit
b3940207
authored
Sep 28, 2020
by
mercury233
Committed by
GitHub
Sep 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cancel MSG_SELECT_PLACE (#2320)
parent
54a5be68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+7
-1
gframe/event_handler.cpp
gframe/event_handler.cpp
+14
-0
No files found.
gframe/duelclient.cpp
View file @
b3940207
...
@@ -1690,7 +1690,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1690,7 +1690,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
case MSG_SELECT_PLACE:
case MSG_SELECT_PLACE:
case MSG_SELECT_DISFIELD: {
case MSG_SELECT_DISFIELD: {
int selecting_player = BufferIO::ReadInt8(pbuf);
int selecting_player = BufferIO::ReadInt8(pbuf);
mainGame
->
dField
.
select_min
=
BufferIO
::
ReadInt8
(
pbuf
);
int count = BufferIO::ReadInt8(pbuf);
mainGame->dField.select_min = count > 0 ? count : 1;
mainGame->dField.select_ready = false;
mainGame->dField.select_cancelable = count == 0;
mainGame->dField.selectable_field = ~BufferIO::ReadInt32(pbuf);
mainGame->dField.selectable_field = ~BufferIO::ReadInt32(pbuf);
if(selecting_player == mainGame->LocalPlayer(1))
if(selecting_player == mainGame->LocalPlayer(1))
mainGame->dField.selectable_field = (mainGame->dField.selectable_field >> 16) | (mainGame->dField.selectable_field << 16);
mainGame->dField.selectable_field = (mainGame->dField.selectable_field >> 16) | (mainGame->dField.selectable_field << 16);
...
@@ -1765,6 +1768,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1765,6 +1768,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
DuelClient::SendResponse();
DuelClient::SendResponse();
return true;
return true;
}
}
if(mainGame->dField.select_cancelable) {
mainGame->dField.ShowCancelOrFinishButton(1);
}
return false;
return false;
}
}
case MSG_SELECT_POSITION: {
case MSG_SELECT_POSITION: {
...
...
gframe/event_handler.cpp
View file @
b3940207
...
@@ -1335,6 +1335,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1335,6 +1335,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
selected_field
=
0
;
selected_field
=
0
;
DuelClient
::
SetResponseB
(
respbuf
,
p
);
DuelClient
::
SetResponseB
(
respbuf
,
p
);
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
ShowCancelOrFinishButton
(
0
);
}
}
}
}
}
}
...
@@ -2513,6 +2514,19 @@ void ClientField::CancelOrFinish() {
...
@@ -2513,6 +2514,19 @@ void ClientField::CancelOrFinish() {
}
}
break
;
break
;
}
}
case
MSG_SELECT_PLACE
:
{
if
(
select_cancelable
)
{
unsigned
char
respbuf
[
3
];
respbuf
[
0
]
=
mainGame
->
LocalPlayer
(
0
);
respbuf
[
1
]
=
0
;
respbuf
[
2
]
=
0
;
mainGame
->
dField
.
selectable_field
=
0
;
DuelClient
::
SetResponseB
(
respbuf
,
3
);
DuelClient
::
SendResponse
();
ShowCancelOrFinishButton
(
0
);
}
break
;
}
}
}
}
}
}
}
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