Commit ec6813fb authored by nanahira's avatar nanahira

refa initializer

parent 104b1e14
...@@ -12,10 +12,6 @@ extern unsigned short replay_mode; ...@@ -12,10 +12,6 @@ extern unsigned short replay_mode;
#endif #endif
SingleDuel::SingleDuel(bool is_match) { SingleDuel::SingleDuel(bool is_match) {
match_mode = is_match; match_mode = is_match;
#ifdef YGOPRO_SERVER_MODE
cache_recorder = 0;
replay_recorder = 0;
#endif
} }
SingleDuel::~SingleDuel() { SingleDuel::~SingleDuel() {
} }
......
...@@ -67,10 +67,10 @@ protected: ...@@ -67,10 +67,10 @@ protected:
unsigned char last_response{ 0 }; unsigned char last_response{ 0 };
std::set<DuelPlayer*> observers; std::set<DuelPlayer*> observers;
#ifdef YGOPRO_SERVER_MODE #ifdef YGOPRO_SERVER_MODE
DuelPlayer* cache_recorder; DuelPlayer* cache_recorder{};
DuelPlayer* replay_recorder; DuelPlayer* replay_recorder{};
unsigned char turn_player; unsigned char turn_player{ 0 };
unsigned short phase; unsigned short phase{ 0 };
#endif #endif
Replay last_replay; Replay last_replay;
bool match_mode{ false }; bool match_mode{ false };
...@@ -81,13 +81,12 @@ protected: ...@@ -81,13 +81,12 @@ protected:
short time_limit[2]{}; short time_limit[2]{};
short time_elapsed{ 0 }; short time_elapsed{ 0 };
#ifdef YGOPRO_SERVER_MODE #ifdef YGOPRO_SERVER_MODE
short time_compensator[2]; short time_compensator[2]{};
short time_backed[2]; short time_backed[2]{};
unsigned char last_game_msg; unsigned char last_game_msg{ 0 };
#endif #endif
}; };
} }
#endif //SINGLE_DUEL_H #endif //SINGLE_DUEL_H
...@@ -16,10 +16,6 @@ TagDuel::TagDuel() { ...@@ -16,10 +16,6 @@ TagDuel::TagDuel() {
ready[i] = false; ready[i] = false;
surrender[i] = false; surrender[i] = false;
} }
#ifdef YGOPRO_SERVER_MODE
cache_recorder = 0;
replay_recorder = 0;
#endif
} }
TagDuel::~TagDuel() { TagDuel::~TagDuel() {
} }
......
...@@ -63,10 +63,10 @@ protected: ...@@ -63,10 +63,10 @@ protected:
DuelPlayer* cur_player[2]; DuelPlayer* cur_player[2];
std::set<DuelPlayer*> observers; std::set<DuelPlayer*> observers;
#ifdef YGOPRO_SERVER_MODE #ifdef YGOPRO_SERVER_MODE
DuelPlayer* cache_recorder; DuelPlayer* cache_recorder{};
DuelPlayer* replay_recorder; DuelPlayer* replay_recorder{};
int turn_player; unsigned char turn_player{ 0 };
int phase; unsigned short phase{ 0 };
#endif #endif
bool ready[4]; bool ready[4];
bool surrender[4]; bool surrender[4];
...@@ -79,13 +79,12 @@ protected: ...@@ -79,13 +79,12 @@ protected:
short time_limit[2]; short time_limit[2];
short time_elapsed; short time_elapsed;
#ifdef YGOPRO_SERVER_MODE #ifdef YGOPRO_SERVER_MODE
short time_compensator[2]; short time_compensator[2]{};
short time_backed[2]; short time_backed[2]{};
unsigned char last_game_msg; unsigned char last_game_msg{ 0 };
#endif #endif
}; };
} }
#endif //TAG_DUEL_H #endif //TAG_DUEL_H
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