Codechange: Use a dedicated variable for disaster vehicle action state. (#10798)
This commit is contained in:
@@ -2141,8 +2141,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