Commit 226eed66 authored by nanahira's avatar nanahira

add REPLAY_MODE_INCLUDE_CHAT

parent 8201eb34
......@@ -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