summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-09 14:43:08 +0000
committerrubidium <rubidium@openttd.org>2010-01-09 14:43:08 +0000
commite4af35d316158767ddd19d87ac1c92086be7a71c (patch)
tree209595e66247eac0defe0806ff0f08706fc7adee /src/aircraft_cmd.cpp
parentf65f276d10e528ffe2581656cfa8066a20002995 (diff)
downloadopenttd-e4af35d316158767ddd19d87ac1c92086be7a71c.tar.xz
(svn r18764) -Fix [FS#3422]: split the (un)load ticks counter and signal wait counter; sometimes they might get into eachother's way
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index dfc9de1db..b51dc5954 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -979,7 +979,7 @@ static bool AircraftController(Aircraft *v)
count = UpdateAircraftSpeed(v, speed_limit, hard_limit);
if (count == 0) return false;
- if (v->time_counter != 0) v->time_counter--;
+ if (v->turn_counter != 0) v->turn_counter--;
do {
@@ -1003,13 +1003,13 @@ static bool AircraftController(Aircraft *v)
Direction newdir = GetDirectionTowards(v, x + amd->x, y + amd->y);
if (newdir != v->direction) {
if (amd->flag & AMED_SLOWTURN && v->number_consecutive_turns < 8 && v->subtype == AIR_AIRCRAFT) {
- if (v->time_counter == 0 || newdir == v->last_direction) {
+ if (v->turn_counter == 0 || newdir == v->last_direction) {
if (newdir == v->last_direction) {
v->number_consecutive_turns = 0;
} else {
v->number_consecutive_turns++;
}
- v->time_counter = 2 * _settings_game.vehicle.plane_speed;
+ v->turn_counter = 2 * _settings_game.vehicle.plane_speed;
v->last_direction = v->direction;
v->direction = newdir;
}