Fix bug using opponent's pit without checking it to be defined
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@2302 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: ba15b475516cd3e441035510e620f73ef229c104 Former-commit-id: 1106cac96b641cdc1cdaceb4370d0b6e8ac61d9a
This commit is contained in:
parent
2dccc1720a
commit
f4aae21bab
1 changed files with 22 additions and 20 deletions
|
@ -3072,6 +3072,8 @@ void Driver::update(tSituation *s)
|
|||
break;
|
||||
}
|
||||
|
||||
if (opponent[i].getCarPtr()->_pit != NULL)
|
||||
{
|
||||
if (opponent[i].getCarPtr()->_pit->pos.seg == car->_pit->pos.seg)
|
||||
{
|
||||
// sharing a pit
|
||||
|
@ -3098,7 +3100,7 @@ void Driver::update(tSituation *s)
|
|||
pitpos = PIT_FRONT; // stop at end of pit space to leave room
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue