was a problem with starting protocol in setup
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@13231 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
4bde8a9337
commit
853d244882
@ -63,7 +63,13 @@ void StartGameProtocol::notifyEvent(Event* event)
|
|||||||
|
|
||||||
void StartGameProtocol::setup()
|
void StartGameProtocol::setup()
|
||||||
{
|
{
|
||||||
m_state = LOADING;
|
m_state = NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartGameProtocol::update()
|
||||||
|
{
|
||||||
|
if (m_state == NONE)
|
||||||
|
{
|
||||||
// if no synchronization protocol exists, create one
|
// if no synchronization protocol exists, create one
|
||||||
SynchronizationProtocol* protocol = static_cast<SynchronizationProtocol*>(m_listener->getProtocol(PROTOCOL_SYNCHRONIZATION));
|
SynchronizationProtocol* protocol = static_cast<SynchronizationProtocol*>(m_listener->getProtocol(PROTOCOL_SYNCHRONIZATION));
|
||||||
if (!protocol)
|
if (!protocol)
|
||||||
@ -84,11 +90,9 @@ void StartGameProtocol::setup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
race_manager->startSingleRace("jungle", 1, false);
|
race_manager->startSingleRace("jungle", 1, false);
|
||||||
|
m_state = LOADING;
|
||||||
}
|
}
|
||||||
|
else if (m_state == LOADING)
|
||||||
void StartGameProtocol::update()
|
|
||||||
{
|
|
||||||
if (m_state == LOADING)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ class NetworkPlayerProfile;
|
|||||||
class StartGameProtocol : public Protocol
|
class StartGameProtocol : public Protocol
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
enum STATE { LOADING, READY };
|
enum STATE { NONE, LOADING, READY };
|
||||||
std::map<NetworkPlayerProfile*, STATE> m_player_states;
|
std::map<NetworkPlayerProfile*, STATE> m_player_states;
|
||||||
|
|
||||||
GameSetup* m_game_setup;
|
GameSetup* m_game_setup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user