diff --git a/src/network/protocols/start_game_protocol.cpp b/src/network/protocols/start_game_protocol.cpp index 9610b7f8d..4120be1bd 100644 --- a/src/network/protocols/start_game_protocol.cpp +++ b/src/network/protocols/start_game_protocol.cpp @@ -39,7 +39,16 @@ StartGameProtocol::StartGameProtocol(GameSetup* game_setup) // ---------------------------------------------------------------------------- StartGameProtocol::~StartGameProtocol() { -} +} // ~StartGameProtocol + +// ---------------------------------------------------------------------------- +void StartGameProtocol::setup() +{ + m_state = NONE; + m_ready_count = 0; + m_ready = false; + Log::info("SynchronizationProtocol", "Ready !"); +} // setup // ---------------------------------------------------------------------------- bool StartGameProtocol::notifyEventAsynchronous(Event* event) @@ -88,16 +97,7 @@ bool StartGameProtocol::notifyEventAsynchronous(Event* event) Log::error("StartGameProtocol", "Received a message with bad format."); } return true; -} - -// ---------------------------------------------------------------------------- -void StartGameProtocol::setup() -{ - m_state = NONE; - m_ready_count = 0; - m_ready = false; - Log::info("SynchronizationProtocol", "Ready !"); -} +} // notifyEventAsynchronous // ---------------------------------------------------------------------------- bool compareKarts(NetworkPlayerProfile* a, NetworkPlayerProfile* b) diff --git a/src/network/protocols/start_game_protocol.hpp b/src/network/protocols/start_game_protocol.hpp index 7d5bb328b..fb906a41e 100644 --- a/src/network/protocols/start_game_protocol.hpp +++ b/src/network/protocols/start_game_protocol.hpp @@ -7,6 +7,8 @@ class GameSetup; class NetworkPlayerProfile; +/** This protocol runs on both server and clients. + */ class StartGameProtocol : public Protocol { protected: diff --git a/src/network/protocols/synchronization_protocol.hpp b/src/network/protocols/synchronization_protocol.hpp index b00ad51b6..af566556b 100644 --- a/src/network/protocols/synchronization_protocol.hpp +++ b/src/network/protocols/synchronization_protocol.hpp @@ -26,9 +26,9 @@ public: virtual void setup(); virtual void update() {} virtual void asynchronousUpdate(); - void startCountdown(int ms_countdown); + // ------------------------------------------------------------------------ int getCountdown() { return (int)(m_countdown*1000.0); } }; // class SynchronizationProtocol