diff options
author | yexo <yexo@openttd.org> | 2009-09-03 12:11:31 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-09-03 12:11:31 +0000 |
commit | 16e3083ff724c93012b821319fc80d311eeacc55 (patch) | |
tree | 49adfe50132aaf481bf631fbbfdb51aaefc5042d /src/aircraft_cmd.cpp | |
parent | dcf3719ca1de0a3645ded7d893396e866ab97cba (diff) | |
download | openttd-16e3083ff724c93012b821319fc80d311eeacc55.tar.xz |
(svn r17405) -Fix (r100): aircraft shouldn't be allowed to make turns bigger then 45 degrees while in flight
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 18c14105e..3baf66116 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1048,6 +1048,8 @@ static bool AircraftController(Aircraft *v) count = UpdateAircraftSpeed(v, speed_limit, hard_limit); if (count == 0) return false; + if (v->load_unload_time_rem != 0) v->load_unload_time_rem--; + do { GetNewVehiclePosResult gp; @@ -1069,9 +1071,15 @@ static bool AircraftController(Aircraft *v) /* Turn. Do it slowly if in the air. */ Direction newdir = GetDirectionTowards(v, x + amd->x, y + amd->y); if (newdir != v->direction) { - v->direction = newdir; - if (!(amd->flag & AMED_SLOWTURN)) { + if (amd->flag & AMED_SLOWTURN) { + if (v->load_unload_time_rem == 0 || newdir == v->last_direction) { + v->load_unload_time_rem = 8; + v->last_direction = v->direction; + v->direction = newdir; + } + } else { v->cur_speed >>= 1; + v->direction = newdir; } } |