summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-12-22 11:55:07 +0000
committerfrosch <frosch@openttd.org>2013-12-22 11:55:07 +0000
commitb02179bd8e269f8373a32980438f0eb9d61f5a62 (patch)
treeb6adbb95c8a308ab6f968f87eac3dce5e7f84f40 /src/roadveh_cmd.cpp
parentb3f08fb67af74ca6e667db8c05ae04f6f5acd28e (diff)
downloadopenttd-b02179bd8e269f8373a32980438f0eb9d61f5a62.tar.xz
(svn r26169) -Fix-ish [FS#5831-ish]: Unify the time a RV needs to travel through a curve.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 364cde208..c70cd4f4e 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1107,7 +1107,7 @@ static bool CanBuildTramTrackOnTile(CompanyID c, TileIndex t, RoadBits r)
return ret.Succeeded();
}
-static bool IndividualRoadVehicleController(RoadVehicle *v, const RoadVehicle *prev)
+bool IndividualRoadVehicleController(RoadVehicle *v, const RoadVehicle *prev)
{
if (v->overtaking != 0) {
if (IsTileType(v->tile, MP_STATION)) {
@@ -1417,17 +1417,12 @@ again:
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.
+ /* Delay the vehicle in curves by making it require one additional frame per turning direction (two in total).
* 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;
- }
+ * The short (inner) curve has 8 frames, this elongates it to 10. */
+ v->UpdateInclination(false, true);
+ return true;
}
/* If the vehicle is in a normal road stop and the frame equals the stop frame OR