Changeset - r28746:17991988a5fd
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 10 months ago 2024-02-12 00:51:18
j.g.rennison@gmail.com
Codefix df691eb3: Reloading GRFs destructed small UFO targeting road vehicle (#12072)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/saveload/vehicle_sl.cpp
Show inline comments
 
@@ -500,13 +500,13 @@ void AfterLoadVehicles(bool part_of_load
 
			case VEH_DISASTER: {
 
				auto *dv = DisasterVehicle::From(v);
 
				if (dv->subtype == ST_SMALL_UFO && dv->state != 0) {
 
					RoadVehicle *u = RoadVehicle::GetIfValid(v->dest_tile.base());
 
					if (u != nullptr && u->IsFrontEngine()) {
 
						/* Delete UFO targetting a vehicle which is already a target. */
 
						if (u->disaster_vehicle != INVALID_VEHICLE) {
 
						if (u->disaster_vehicle != INVALID_VEHICLE && u->disaster_vehicle != dv->index) {
 
							delete v;
 
							continue;
 
						} else {
 
							u->disaster_vehicle = dv->index;
 
						}
 
					}
0 comments (0 inline, 0 general)