- Timestamp:
- May 24, 2018, 3:03:31 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceController.cc
r11982 r11986 107 107 return returnVec; 108 108 } 109 /*void SpaceRaceController::endtheGame() const {109 void SpaceRaceController::endtheGame() const { 110 110 SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype()); 111 assert(gametype) ;112 if (!gametype)111 assert(gametype) 112 ; if (!gametype) 113 113 return; 114 gametype->bLost=true; 114 115 gametype->end(); 115 116 116 } */117 } 117 118 /* 118 119 * called from 'findStaticCheckpoints' … … 176 177 { 177 178 RaceCheckPoint* nextRaceCheckPoint = findCheckpoint(checkpointIndex); 179 178 180 float distance = recCalculateDistance(nextRaceCheckPoint, this->getControllableEntity()->getPosition()); 179 181 … … 184 186 185 187 } 186 187 } 188 if(minNextRaceCheckPoint == nullptr) { orxout()<<"nullptr found @181 SpaceRaceController" << endl;} 188 //There is a bug. If the user passes through the 19th checkpoint with the opponents, the game will end immediately 189 if(nextRaceCheckPoint->isLast()) 190 endtheGame(); 191 192 } 193 if(minNextRaceCheckPoint == nullptr) { orxout()<<"nullptr found @192 SpaceRaceController" << endl;} 189 194 return minNextRaceCheckPoint; 190 195 }
Note: See TracChangeset
for help on using the changeset viewer.