Minor code cleanup.
This commit is contained in:
parent
786f9eb693
commit
34dad96017
@ -11,15 +11,25 @@ class NetworkPlayerProfile;
|
|||||||
*/
|
*/
|
||||||
class StartGameProtocol : public Protocol
|
class StartGameProtocol : public Protocol
|
||||||
{
|
{
|
||||||
protected:
|
private:
|
||||||
enum STATE { NONE, SYNCHRONIZATION_WAIT, LOADING, READY, EXITING };
|
/** State for the finite state machine, and also for
|
||||||
|
* remote clients. */
|
||||||
|
enum STATE { NONE, SYNCHRONIZATION_WAIT,
|
||||||
|
LOADING, READY, EXITING };
|
||||||
|
|
||||||
|
/** State of the finite state machine. */
|
||||||
|
STATE m_state;
|
||||||
|
|
||||||
|
/** Keeps the state for all clients. */
|
||||||
std::map<NetworkPlayerProfile*, STATE> m_player_states;
|
std::map<NetworkPlayerProfile*, STATE> m_player_states;
|
||||||
|
|
||||||
|
/** Stores a handy pointer to the game setup structure. */
|
||||||
GameSetup* m_game_setup;
|
GameSetup* m_game_setup;
|
||||||
int m_ready_count;
|
|
||||||
double m_sending_time;
|
|
||||||
|
|
||||||
STATE m_state;
|
/** Counts how many clients have reported to be ready (which is then
|
||||||
|
* used to trigger the next state one all clients are ready). */
|
||||||
|
int m_ready_count;
|
||||||
|
|
||||||
bool m_ready;
|
bool m_ready;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user