Changeset - r21070:9ea518c4558d
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-12-08 21:22:03
frosch@openttd.org
(svn r26152) -Revert/Fix (r26118) [FS#5822]: While the condition is non-sense, the 'true' case is required for articulated parts and the 'false' case is required for savegame compatibility.
1 file changed with 12 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/roadveh_cmd.cpp
Show inline comments
 
@@ -1413,12 +1413,24 @@ again:
 
	}
 

	
 
	Direction old_dir = v->direction;
 
	if (new_dir != old_dir) {
 
		v->direction = new_dir;
 
		if (_settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL) v->cur_speed -= v->cur_speed >> 2;
 

	
 
		/* Delay the vehicle in curves by making it require one or two additional frames per curve.
 
		 * A vehicle has to spend at least 9 frames on a tile, so the following articulated part can follow.
 
		 * (The following part may only be one tile behind, and the front part is moved before the following ones.)
 
		 * The short (inner) curve has 8 frames, this elongates it to 9 or 10.
 
		 *
 
		 * The difference between 9 and 10 is arbitrary, and completely bollocks (i.e. a bug).
 
		 * Unifying this requires a complicated savegame conversion. */
 
		if (old_dir != v->state) {
 
			v->UpdateInclination(false, true);
 
			return true;
 
		}
 
	}
 

	
 
	/* If the vehicle is in a normal road stop and the frame equals the stop frame OR
 
	 * if the vehicle is in a drive-through road stop and this is the destination station
 
	 * and it's the correct type of stop (bus or truck) and the frame equals the stop frame...
 
	 * (the station test and stop type test ensure that other vehicles, using the road stop as
0 comments (0 inline, 0 general)