diff options
author | frosch <frosch@openttd.org> | 2010-07-04 13:07:47 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-07-04 13:07:47 +0000 |
commit | a7d168b2e5be77e361336d61c21b2b22f932fcc5 (patch) | |
tree | aca46a4f7a9e467b164537edb26b20769b9e1de8 /src/ship_cmd.cpp | |
parent | ed2213df239a84c1ef7962e4cf7abe102f0fcb5f (diff) | |
download | openttd-a7d168b2e5be77e361336d61c21b2b22f932fcc5.tar.xz |
(svn r20079) -Codechange [FS#3922]: Add helper functions to deal with the 192-256-magic of vehicle movement.
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r-- | src/ship_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 625c0cdd4..dd999b08c 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -346,8 +346,8 @@ static bool ShipAccelerate(Vehicle *v) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); } - /* Decrease somewhat when turning */ - if (!(v->direction & 1)) spd = spd * 3 / 4; + /* Convert direction-indepenent speed into direction-dependent speed. (old movement method) */ + spd = v->GetOldAdvanceSpeed(spd); if (spd == 0) return false; if ((byte)++spd == 0) return true; |