forked from mirror/OpenTTD
(svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted
This commit is contained in:
@@ -604,7 +604,10 @@ void CallVehicleTicks()
|
||||
|
||||
Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
v->Tick();
|
||||
/* Vehicle could be deleted in this tick */
|
||||
if (!v->Tick()) continue;
|
||||
|
||||
assert(v->IsValid());
|
||||
|
||||
switch (v->type) {
|
||||
default: break;
|
||||
|
Reference in New Issue
Block a user