Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (unsigned int i = 0; i < tokens.size() - 1; i++)
- {
- string key = tokens[i];
- string val = tokens[i+1];
- if(!strcmp(key.c_str(), "gamestate"))
- {
- gamestate_e newgs = ( gamestate_e ) atoi( val.c_str() );
- if(newgs != m_currentGameState)
- {
- for (unsigned int j = 0; j < 64; j++)
- {
- m_players[j].isDead = 1;
- }
- // if we start, reset waypoint counter
- if(m_currentGameState == GS_WARMUP_COUNTDOWN && newgs == GS_PLAYING)
- {
- m_pathRound++;
- for (unsigned int j = 0; j < 64; j++)
- {
- m_players[j].waypoints = 0;
- }
- }
- GetGamestateCallback()->Execute(m_currentGameState, newgs, m_currentRound, tmp.c_str());
- m_currentGameState = newgs;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement