Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 28, 2006, 2:43:05 PM (19 years ago)
Author:
rennerc
Message:

fixed segfault

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/multi_player_map/src/util/multiplayer_team_deathmatch.cc

    r8851 r8856  
    6868  this->numTeams = 2;
    6969  this->currentGameState = GAMESTATE_PRE_GAME;
    70   this->gameStateTimer = 10.0f;
     70  this->gameStateTimer = 3.0f;
    7171  this->bShowTeamChange = false;
    7272
     
    221221
    222222  //handle kills
    223   for ( std::vector<Kill>::iterator it = this->killList.begin(); it != this->killList.end();  )
    224   {
    225     std::vector<Kill>::iterator delit = it;
    226 
    227     onKill( it->getKiller()->getOwner(), it->getVictim()->getOwner() );
    228 
    229     it++;
    230     killList.erase( delit );
    231   }
     223  while ( this->killList.begin() != this->killList.end() )
     224  {
     225    if ( this->killList.begin()->getKiller() != NULL && this->killList.begin()->getVictim() != NULL )
     226      onKill( this->killList.begin()->getKiller()->getOwner(), this->killList.begin()->getVictim()->getOwner() );
     227    this->killList.erase( this->killList.begin() );
     228  }
     229 
     230
    232231
    233232  gameStateTimer -= dt;
Note: See TracChangeset for help on using the changeset viewer.