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
90488d48
Commit
90488d48
authored
Oct 30, 2023
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skystriker thing
parent
6de6d71d
Pipeline
#23908
passed with stages
in 3 minutes and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
52 deletions
+60
-52
gframe/single_duel.cpp
gframe/single_duel.cpp
+60
-52
No files found.
gframe/single_duel.cpp
View file @
90488d48
...
...
@@ -705,6 +705,9 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
NetServer
::
ReSendToPlayer
(
players
[
1
]);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
#ifdef YGOPRO_SERVER_MODE
NetServer
::
ReSendToPlayers
(
cache_recorder
,
replay_recorder
);
#endif
// server should send to recorder as well
RefreshGrave
(
0
,
0xefffff
,
0
);
RefreshGrave
(
1
,
0xefffff
,
0
);
...
...
@@ -2040,15 +2043,16 @@ if(!dp || dp == players[player])
NetServer
::
ReSendToPlayer
(
replay_recorder
);
#endif
int
qlen
=
0
;
/*while(qlen < len) {
int clen = BufferIO::ReadInt32(qbuf);
qlen += clen;
if (clen == 4)
continue;
if (qbuf[11] & POS_FACEDOWN)
memset(qbuf, 0, clen - 4);
qbuf += clen - 4;
}*/
if
(
!
is_skystriker
[
1
-
player
])
while
(
qlen
<
len
)
{
int
clen
=
BufferIO
::
ReadInt32
(
qbuf
);
qlen
+=
clen
;
if
(
clen
==
4
)
continue
;
if
(
qbuf
[
11
]
&
POS_FACEDOWN
)
memset
(
qbuf
,
0
,
clen
-
4
);
qbuf
+=
clen
-
4
;
}
#ifdef YGOPRO_SERVER_MODE
if
(
!
dp
||
dp
==
players
[
1
-
player
])
#endif
...
...
@@ -2088,15 +2092,16 @@ if(!dp || dp == players[player])
NetServer
::
ReSendToPlayer
(
replay_recorder
);
#endif
int
qlen
=
0
;
/*while(qlen < len) {
int clen = BufferIO::ReadInt32(qbuf);
qlen += clen;
if (clen == 4)
continue;
if (qbuf[11] & POS_FACEDOWN)
memset(qbuf, 0, clen - 4);
qbuf += clen - 4;
}*/
if
(
!
is_skystriker
[
1
-
player
])
while
(
qlen
<
len
)
{
int
clen
=
BufferIO
::
ReadInt32
(
qbuf
);
qlen
+=
clen
;
if
(
clen
==
4
)
continue
;
if
(
qbuf
[
11
]
&
POS_FACEDOWN
)
memset
(
qbuf
,
0
,
clen
-
4
);
qbuf
+=
clen
-
4
;
}
#ifdef YGOPRO_SERVER_MODE
if
(
!
dp
||
dp
==
players
[
1
-
player
])
#endif
...
...
@@ -2136,18 +2141,19 @@ if(!dp || dp == players[player])
NetServer
::
ReSendToPlayer
(
replay_recorder
);
#endif
int
qlen
=
0
;
/*while(qlen < len) {
int slen = BufferIO::ReadInt32(qbuf);
int qflag = *(int*)qbuf;
int offset = 8;
if(!(qflag & QUERY_CODE))
offset -= 4;
unsigned position = ((*(int*)(qbuf + offset)) >> 24) & 0xff;
if(!(position & POS_FACEUP))
memset(qbuf, 0, slen - 4);
qbuf += slen - 4;
qlen += slen;
}*/
if
(
!
is_skystriker
[
1
-
player
])
while
(
qlen
<
len
)
{
int
slen
=
BufferIO
::
ReadInt32
(
qbuf
);
int
qflag
=
*
(
int
*
)
qbuf
;
int
offset
=
8
;
if
(
!
(
qflag
&
QUERY_CODE
))
offset
-=
4
;
unsigned
position
=
((
*
(
int
*
)(
qbuf
+
offset
))
>>
24
)
&
0xff
;
if
(
!
(
position
&
POS_FACEUP
))
memset
(
qbuf
,
0
,
slen
-
4
);
qbuf
+=
slen
-
4
;
qlen
+=
slen
;
}
#ifdef YGOPRO_SERVER_MODE
if
(
!
dp
||
dp
==
players
[
1
-
player
])
#endif
...
...
@@ -2220,15 +2226,16 @@ if(!dp || dp == players[player])
if
(
!
dp
)
NetServer
::
ReSendToPlayer
(
replay_recorder
);
int
qlen
=
0
;
/*while(qlen < len) {
int clen = BufferIO::ReadInt32(qbuf);
qlen += clen;
if (clen == 4)
continue;
if (qbuf[11] & POS_FACEDOWN)
memset(qbuf, 0, clen - 4);
qbuf += clen - 4;
}*/
if
(
!
is_skystriker
[
1
-
player
])
while
(
qlen
<
len
)
{
int
clen
=
BufferIO
::
ReadInt32
(
qbuf
);
qlen
+=
clen
;
if
(
clen
==
4
)
continue
;
if
(
qbuf
[
11
]
&
POS_FACEDOWN
)
memset
(
qbuf
,
0
,
clen
-
4
);
qbuf
+=
clen
-
4
;
}
if
(
!
dp
||
dp
==
players
[
1
-
player
])
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
query_buffer
,
len
+
3
);
if
(
!
dp
)
...
...
@@ -2251,15 +2258,16 @@ void SingleDuel::RefreshRemoved(int player, int flag, int use_cache, DuelPlayer*
if
(
!
dp
)
NetServer
::
ReSendToPlayer
(
replay_recorder
);
int
qlen
=
0
;
/*while(qlen < len) {
int clen = BufferIO::ReadInt32(qbuf);
qlen += clen;
if (clen == 4)
continue;
if (qbuf[11] & POS_FACEDOWN)
memset(qbuf, 0, clen - 4);
qbuf += clen - 4;
}*/
if
(
!
is_skystriker
[
1
-
player
])
while
(
qlen
<
len
)
{
int
clen
=
BufferIO
::
ReadInt32
(
qbuf
);
qlen
+=
clen
;
if
(
clen
==
4
)
continue
;
if
(
qbuf
[
11
]
&
POS_FACEDOWN
)
memset
(
qbuf
,
0
,
clen
-
4
);
qbuf
+=
clen
-
4
;
}
if
(
!
dp
||
dp
==
players
[
1
-
player
])
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
query_buffer
,
len
+
3
);
if
(
!
dp
)
...
...
@@ -2278,16 +2286,16 @@ void SingleDuel::RefreshSingle(int player, int location, int sequence, int flag)
BufferIO
::
WriteInt8
(
qbuf
,
sequence
);
int
len
=
query_card
(
pduel
,
player
,
location
,
sequence
,
flag
,
(
unsigned
char
*
)
qbuf
,
0
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
query_buffer
,
len
+
4
);
//if(
location == LOCATION_REMOVED && (qbuf[15] & POS_FACEDOWN))
//
return;
//if (
(location & 0x90) || ((location & 0x2c) && (qbuf[15] & POS_FACEUP))) {
if
(
!
is_skystriker
[
1
-
player
]
&&
location
==
LOCATION_REMOVED
&&
(
qbuf
[
15
]
&
POS_FACEDOWN
))
return
;
if
(
is_skystriker
[
1
-
player
]
||
(
location
&
0x90
)
||
((
location
&
0x2c
)
&&
(
qbuf
[
15
]
&
POS_FACEUP
)))
{
NetServer
::
ReSendToPlayer
(
players
[
1
-
player
]);
for
(
auto
pit
=
observers
.
begin
();
pit
!=
observers
.
end
();
++
pit
)
NetServer
::
ReSendToPlayer
(
*
pit
);
#ifdef YGOPRO_SERVER_MODE
NetServer
::
ReSendToPlayers
(
cache_recorder
,
replay_recorder
);
#endif
//
}
}
}
int
SingleDuel
::
MessageHandler
(
intptr_t
fduel
,
int
type
)
{
if
(
!
enable_log
)
...
...
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