Codechange: Use a dedicated variable for disaster vehicle action state. (#10798)
(cherry picked from commit 72c7536325
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
2c91866831
commit
e5654a0414
@@ -2549,8 +2549,8 @@ bool AfterLoadGame()
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_121)) {
|
||||
/* Delete small ufos heading for non-existing vehicles */
|
||||
for (Vehicle *v : DisasterVehicle::Iterate()) {
|
||||
if (v->subtype == 2 /* ST_SMALL_UFO */ && v->current_order.GetDestination() != 0) {
|
||||
for (DisasterVehicle *v : DisasterVehicle::Iterate()) {
|
||||
if (v->subtype == 2 /* ST_SMALL_UFO */ && v->state != 0) {
|
||||
const Vehicle *u = Vehicle::GetIfValid(v->dest_tile);
|
||||
if (u == nullptr || u->type != VEH_ROAD || !RoadVehicle::From(u)->IsFrontEngine()) {
|
||||
delete v;
|
||||
|
Reference in New Issue
Block a user