Commit 7828ff96 authored by mercury233's avatar mercury233

update

parent 09d16cf4
...@@ -14,3 +14,4 @@ ...@@ -14,3 +14,4 @@
/gframe/ygopro.aps /gframe/ygopro.aps
ygopro ygopro
premake5.exe premake5.exe
premake5
...@@ -3,7 +3,7 @@ include "lzma" ...@@ -3,7 +3,7 @@ include "lzma"
project "ygopro" project "ygopro"
kind "ConsoleApp" kind "ConsoleApp"
defines { "YGOPRO_SERVER_MODE" } defines { "YGOPRO_SERVER_MODE" }
files { "gframe.cpp", "config.h", files { "gframe.cpp", "config.h",
"game.cpp", "game.h", "game.cpp", "game.h",
...@@ -12,8 +12,7 @@ project "ygopro" ...@@ -12,8 +12,7 @@ project "ygopro"
"replay.cpp", "replay.h", "replay.cpp", "replay.h",
"netserver.cpp", "netserver.h", "netserver.cpp", "netserver.h",
"single_duel.cpp", "single_duel.h", "single_duel.cpp", "single_duel.h",
"tag_duel.cpp", "tag_duel.h", "tag_duel.cpp", "tag_duel.h" }
"**.cc", "**.c"}
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
links { "ocgcore", "clzma", "sqlite3", "lua" , "event"} links { "ocgcore", "clzma", "sqlite3", "lua" , "event"}
......
...@@ -203,10 +203,12 @@ void SingleDuel::LeaveGame(DuelPlayer* dp) { ...@@ -203,10 +203,12 @@ void SingleDuel::LeaveGame(DuelPlayer* dp) {
NetServer::StopServer(); NetServer::StopServer();
return; return;
} }
ready[host_pos] = false; if(!game_started) {
STOC_TypeChange sctc; ready[host_pos] = false;
sctc.type = 0x10 | host_pos; STOC_TypeChange sctc;
NetServer::SendPacketToPlayer(players[host_pos], STOC_TYPE_CHANGE, sctc); sctc.type = 0x10 | host_pos;
NetServer::SendPacketToPlayer(players[host_pos], STOC_TYPE_CHANGE, sctc);
}
} }
if(dp->type == NETPLAYER_TYPE_OBSERVER) { if(dp->type == NETPLAYER_TYPE_OBSERVER) {
#else #else
......
...@@ -175,10 +175,12 @@ void TagDuel::LeaveGame(DuelPlayer* dp) { ...@@ -175,10 +175,12 @@ void TagDuel::LeaveGame(DuelPlayer* dp) {
NetServer::StopServer(); NetServer::StopServer();
return; return;
} }
ready[host_pos] = false; if(!game_started) {
STOC_TypeChange sctc; ready[host_pos] = false;
sctc.type = 0x10 | host_pos; STOC_TypeChange sctc;
NetServer::SendPacketToPlayer(players[host_pos], STOC_TYPE_CHANGE, sctc); sctc.type = 0x10 | host_pos;
NetServer::SendPacketToPlayer(players[host_pos], STOC_TYPE_CHANGE, sctc);
}
} }
if(dp->type == NETPLAYER_TYPE_OBSERVER) { if(dp->type == NETPLAYER_TYPE_OBSERVER) {
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment