Commit a167dbce authored by nanahira's avatar nanahira

Merge branch 'server' of github.com:moecube/ygopro into server

parents 0a96f560 ca3e267d
Pipeline #17869 passed with stages
in 2 minutes and 26 seconds
......@@ -42,14 +42,14 @@ HostInfo game_info;
void Game::MainServerLoop() {
#ifdef SERVER_ZIP_SUPPORT
dataManager.FileSystem = new irr::io::CFileSystem();
#endif
#ifdef SERVER_PRO2_SUPPORT
dataManager.FileSystem->addFileArchive("data/script.zip");
#endif
initUtils();
deckManager.LoadLFList();
dataManager.LoadDB(L"cards.cdb");
LoadExpansions();
#ifdef SERVER_PRO2_SUPPORT
dataManager.FileSystem->addFileArchive("data/script.zip", true, false, EFAT_ZIP);
#endif
server_port = NetServer::StartServer(server_port);
NetServer::InitDuel();
......
......@@ -20,6 +20,7 @@ namespace ygo {
#ifdef YGOPRO_SERVER_MODE
#define REPLAY_MODE_SAVE_IN_SERVER 0x1
#define REPLAY_MODE_WATCHER_NO_SEND 0x2
#define REPLAY_MODE_INCLUDE_CHAT 0x4
#endif // YGOPRO_SERVER_MODE
struct ReplayHeader {
......
......@@ -38,6 +38,8 @@ void SingleDuel::Chat(DuelPlayer* dp, void* pdata, int len) {
#ifdef YGOPRO_SERVER_MODE
if(cache_recorder)
NetServer::ReSendToPlayer(cache_recorder);
if(replay_recorder && replay_mode & REPLAY_MODE_INCLUDE_CHAT)
NetServer::ReSendToPlayer(replay_recorder);
#endif
}
void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {
......
......@@ -34,6 +34,8 @@ void TagDuel::Chat(DuelPlayer* dp, void* pdata, int len) {
#ifdef YGOPRO_SERVER_MODE
if(cache_recorder)
NetServer::ReSendToPlayer(cache_recorder);
if(replay_recorder && replay_mode & REPLAY_MODE_INCLUDE_CHAT)
NetServer::ReSendToPlayer(replay_recorder);
#endif
}
void TagDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {
......
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