Prevent EndRace being called during a pitstop after the car has finished (I am not sure if this extually happended)

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@800 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3cdc03d17be51b02d9f7e7d547563ab2e7bb8a90
Former-commit-id: d8cf87b36bc5b9a8c73fc8457367a17b22b4d224
This commit is contained in:
martkelder 2009-03-02 07:45:18 +00:00
parent 5a159e03c6
commit 6f45061992

View file

@ -548,7 +548,8 @@ ReOneStep(double deltaTimeIncrement)
robot = s->cars[i]->robot;
robot->rbDrive(robot->index, s->cars[i], s);
}
else if (! (s->cars[i]->_state & RM_CAR_STATE_ENDRACE_CALLED ) && s->cars[i]->_state & RM_CAR_STATE_OUT ) { //No simu, look if it is out
else if (! (s->cars[i]->_state & RM_CAR_STATE_ENDRACE_CALLED ) && ( s->cars[i]->_state & RM_CAR_STATE_OUT ) == RM_CAR_STATE_OUT )
{ // ^^ No simu, look if it is out
robot = s->cars[i]->robot;
if (robot->rbEndRace)
robot->rbEndRace(robot->index, s->cars[i], s);