Changeset - r17300:ac2d0a431bea
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2011-02-10 18:28:25
rubidium@openttd.org
(svn r22050) -Fix-ish [FS#4496]: in ancient savegames, e.g. TTO savegames, non primary vehicles (wagons and such) could have unitnumbers or even orders. However, these orders would not be updated when a station is removed. As such some savegames have wagons with current orders to invalid stations which triggers trouble in the load conversion. So, trash any orders/unitnumbers a non-primary vehicle has.
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/saveload/vehicle_sl.cpp
Show inline comments
 
@@ -289,6 +289,12 @@ void AfterLoadVehicles(bool part_of_load
 
					}
 
				}
 
			}
 

	
 
			/* In some old savegames there might be some "crap" stored. */
 
			if (IsSavegameVersionBefore(160) && !v->IsPrimaryVehicle()) {
 
				v->current_order.Free();
 
				v->unitnumber = 0;
 
			}
 
		}
 
	}
 

	
0 comments (0 inline, 0 general)