Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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-core
Commits
6ad3fd52
Commit
6ad3fd52
authored
Jun 13, 2021
by
mercury233
Committed by
GitHub
Jun 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix select_place accept selecting same field twice (#382)
parent
a5de4ce1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
playerop.cpp
playerop.cpp
+8
-1
No files found.
playerop.cpp
View file @
6ad3fd52
...
@@ -432,16 +432,23 @@ int32 field::select_place(uint16 step, uint8 playerid, uint32 flag, uint8 count)
...
@@ -432,16 +432,23 @@ int32 field::select_place(uint16 step, uint8 playerid, uint32 flag, uint8 count)
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
uint8
pt
=
0
;
uint8
pt
=
0
;
uint32
selected
=
0
;
for
(
int8
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int8
i
=
0
;
i
<
count
;
++
i
)
{
uint8
p
=
returns
.
bvalue
[
pt
];
uint8
p
=
returns
.
bvalue
[
pt
];
uint8
l
=
returns
.
bvalue
[
pt
+
1
];
uint8
l
=
returns
.
bvalue
[
pt
+
1
];
uint8
s
=
returns
.
bvalue
[
pt
+
2
];
uint8
s
=
returns
.
bvalue
[
pt
+
2
];
uint32
sel
=
0x1u
<<
(
s
+
(
p
==
playerid
?
0
:
16
)
+
(
l
==
LOCATION_MZONE
?
0
:
8
));
if
((
p
!=
0
&&
p
!=
1
)
if
((
p
!=
0
&&
p
!=
1
)
||
((
l
!=
LOCATION_MZONE
)
&&
(
l
!=
LOCATION_SZONE
))
||
((
l
!=
LOCATION_MZONE
)
&&
(
l
!=
LOCATION_SZONE
))
||
(
(
0x1u
<<
s
)
&
(
flag
>>
(((
p
==
playerid
)
?
0
:
16
)
+
((
l
==
LOCATION_MZONE
)
?
0
:
8
)))
))
{
||
(
sel
&
flag
)
||
(
sel
&
selected
))
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
if
(
sel
&
(
0x1
<<
5
))
sel
|=
0x1
<<
(
16
+
6
);
if
(
sel
&
(
0x1
<<
6
))
sel
|=
0x1
<<
(
16
+
5
);
selected
|=
sel
;
pt
+=
3
;
pt
+=
3
;
}
}
return
TRUE
;
return
TRUE
;
...
...
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