Changeset - r10913:146392b12957
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2009-01-23 23:57:01
smatz@openttd.org
(svn r15248) -Fix [FS#2561]: we require v->cur_speed to be zero for wagons and non-front engines
1 file changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/saveload/vehicle_sl.cpp
Show inline comments
 
@@ -274,8 +274,15 @@ void AfterLoadVehicles(bool part_of_load
 
	}
 

	
 
	/* Stop non-front engines */
 
	FOR_ALL_VEHICLES(v) {
 
		if (v->type == VEH_TRAIN && IsTrainEngine(v) && !IsFrontEngine(v)) v->vehstatus |= VS_STOPPED;
 
	if (CheckSavegameVersion(112)) {
 
		FOR_ALL_VEHICLES(v) {
 
			if (v->type == VEH_TRAIN && !IsFrontEngine(v)) {
 
				if (IsTrainEngine(v)) v->vehstatus |= VS_STOPPED;
 
				/* cur_speed is now relevant for non-front parts - nonzero breaks
 
				 * moving-wagons-inside-depot- and autoreplace- code */
 
				v->cur_speed = 0;
 
			}
 
		}
 
	}
 

	
 
	FOR_ALL_VEHICLES(v) {
0 comments (0 inline, 0 general)