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/aircraft_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/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index d9aef2a12..c1c78a88e 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -734,7 +734,8 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE, /* Adjust distance moved by plane speed setting */ if (_settings_game.vehicle.plane_speed > 1) spd /= _settings_game.vehicle.plane_speed; - if (!(v->direction & 1)) spd = spd * 3 / 4; + /* Convert direction-indepenent speed into direction-dependent speed. (old movement method) */ + spd = v->GetOldAdvanceSpeed(spd); spd += v->progress; v->progress = (byte)spd; |