summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-12-08 21:22:03 +0000
committerfrosch <frosch@openttd.org>2013-12-08 21:22:03 +0000
commitc69c2a243b1ab0b99f879391e5dcb06c071a3ae7 (patch)
treeaa94a220d00489b8bf96d271ab0a0832c16034cc /src/roadveh_cmd.cpp
parent065f8df8607514eb945890fa8073c6f7b062daa6 (diff)
downloadopenttd-c69c2a243b1ab0b99f879391e5dcb06c071a3ae7.tar.xz
(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.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 1fc6d0d96..364cde208 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1416,6 +1416,18 @@ again:
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