mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-06 20:39:38 +01:00
(svn r94) -Fix: AI crash bug (blathijs)
This commit is contained in:
parent
c55eda92f8
commit
b43e1e4e43
3
ai_new.c
3
ai_new.c
@ -487,12 +487,13 @@ static bool AiNew_CheckVehicleStation(Player *p, Station *st) {
|
|||||||
FOR_ALL_VEHICLES(v) {
|
FOR_ALL_VEHICLES(v) {
|
||||||
if (v->owner == _current_player) {
|
if (v->owner == _current_player) {
|
||||||
sched = v->schedule_ptr;
|
sched = v->schedule_ptr;
|
||||||
|
if (sched == NULL) continue;
|
||||||
while ((ord=*sched++) != 0) {
|
while ((ord=*sched++) != 0) {
|
||||||
if ((ord & OT_MASK) == OT_GOTO_STATION && DEREF_STATION(ord >> 8) == st) {
|
if ((ord & OT_MASK) == OT_GOTO_STATION && DEREF_STATION(ord >> 8) == st) {
|
||||||
// This vehicle has this city in his list
|
// This vehicle has this city in his list
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user