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
REIKAI
ygopro
Commits
2b409bc6
Commit
2b409bc6
authored
Aug 09, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
c169dd65
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
10 deletions
+5
-10
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/game.h
gframe/game.h
+2
-2
gframe/network.h
gframe/network.h
+0
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-3
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-3
No files found.
gframe/game.cpp
View file @
2b409bc6
...
...
@@ -29,6 +29,7 @@ Game* mainGame;
#ifdef YGOPRO_SERVER_MODE
unsigned
short
aServerPort
;
unsigned
short
replay_mode
;
unsigned
int
lflist
;
unsigned
char
rule
;
unsigned
char
mode
;
...
...
@@ -37,7 +38,6 @@ bool no_check_deck;
bool
no_shuffle_deck
;
unsigned
int
start_lp
;
unsigned
short
time_limit
;
unsigned
short
replay_mode
;
unsigned
char
start_hand
;
unsigned
char
draw_count
;
...
...
gframe/game.h
View file @
2b409bc6
...
...
@@ -438,6 +438,7 @@ public:
extern
Game
*
mainGame
;
#ifdef YGOPRO_SERVER_MODE
extern
unsigned
short
aServerPort
;
unsigned
short
replay_mode
;
extern
unsigned
int
lflist
;
extern
unsigned
char
rule
;
extern
unsigned
char
mode
;
...
...
@@ -446,8 +447,7 @@ extern bool no_check_deck;
extern
bool
no_shuffle_deck
;
extern
unsigned
int
start_lp
;
extern
unsigned
short
time_limit
;
extern
unsigned
short
replay_mode
;
extern
unsigned
char
start_hand
;
xextern
unsigned
char
start_hand
;
extern
unsigned
char
draw_count
;
#endif //YGOPRO_SERVER_MODE
...
...
gframe/network.h
View file @
2b409bc6
...
...
@@ -22,7 +22,6 @@ struct HostInfo {
unsigned
char
start_hand
;
unsigned
char
draw_count
;
unsigned
short
time_limit
;
unsigned
short
replay_mode
;
};
struct
HostPacket
{
unsigned
short
identifier
;
...
...
gframe/single_duel.cpp
View file @
2b409bc6
...
...
@@ -87,7 +87,6 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {
host_info
.
duel_rule
=
DEFAULT_DUEL_RULE
;
host_info
.
rule
=
0
;
host_info
.
time_limit
=
180
;
host_info
.
replay_mode
=
0
;
if
(
ygo
::
start_hand
!=
0
){
host_info
.
start_hand
=
ygo
::
start_hand
;
...
...
@@ -99,7 +98,6 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {
host_info
.
duel_rule
=
ygo
::
duel_rule
;
host_info
.
rule
=
ygo
::
rule
;
host_info
.
time_limit
=
ygo
::
time_limit
;
host_info
.
replay_mode
=
ygo
::
replay_mode
;
}
}
else
{
...
...
@@ -1559,7 +1557,7 @@ void SingleDuel::EndDuel() {
memcpy
(
pbuf
,
last_replay
.
comp_data
,
last_replay
.
comp_size
);
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_REPLAY
,
replaybuf
,
sizeof
(
ReplayHeader
)
+
last_replay
.
comp_size
);
NetServer
::
ReSendToPlayer
(
players
[
1
]);
if
(
host_info
.
replay_mode
==
0
)
{
if
(
ygo
::
replay_mode
==
0
)
{
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
for
(
auto
oit
=
recorders
.
begin
();
oit
!=
recorders
.
end
();
++
oit
)
...
...
gframe/tag_duel.cpp
View file @
2b409bc6
...
...
@@ -68,7 +68,6 @@ void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {
host_info
.
duel_rule
=
DEFAULT_DUEL_RULE
;
host_info
.
rule
=
0
;
host_info
.
time_limit
=
180
;
host_info
.
replay_mode
=
0
;
if
(
ygo
::
start_hand
!=
0
){
host_info
.
start_hand
=
ygo
::
start_hand
;
...
...
@@ -80,7 +79,6 @@ void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {
host_info
.
duel_rule
=
ygo
::
duel_rule
;
host_info
.
rule
=
ygo
::
rule
;
host_info
.
time_limit
=
ygo
::
time_limit
;
host_info
.
replay_mode
=
ygo
::
replay_mode
;
}
}
else
{
...
...
@@ -1623,7 +1621,7 @@ void TagDuel::EndDuel() {
NetServer
::
ReSendToPlayer
(
players
[
1
]);
NetServer
::
ReSendToPlayer
(
players
[
2
]);
NetServer
::
ReSendToPlayer
(
players
[
3
]);
if
(
host_info
.
replay_mode
==
0
)
{
if
(
ygo
::
replay_mode
==
0
)
{
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
for
(
auto
oit
=
recorders
.
begin
();
oit
!=
recorders
.
end
();
++
oit
)
...
...
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