summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-15 20:58:44 +0000
committerrubidium <rubidium@openttd.org>2009-09-15 20:58:44 +0000
commitaf457fc9fe53686de6210c0bf8ec488993e22f56 (patch)
tree76f42c210572514a2f0053304b1063ea8b6e2b0f /src/aircraft_cmd.cpp
parente9ae22d2c554814cf256a95dde841cea30a86a3e (diff)
downloadopenttd-af457fc9fe53686de6210c0bf8ec488993e22f56.tar.xz
(svn r17552) -Codechange: rename load_unload_time_rem to something more generic as it's used for more than just load/unload. Also add some documentation about where it is used.
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 99faffa8e..df8b91b25 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -325,7 +325,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
v->name = NULL;
// v->next_order_param = v->next_order = 0;
-// v->load_unload_time_rem = 0;
+// v->time_counter = 0;
// v->progress = 0;
v->last_station_visited = INVALID_STATION;
// v->destination_coords = 0;
@@ -1048,7 +1048,7 @@ 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--;
+ if (v->time_counter != 0) v->time_counter--;
do {
@@ -1072,13 +1072,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) {
- if (v->load_unload_time_rem == 0 || newdir == v->last_direction) {
+ if (v->time_counter == 0 || newdir == v->last_direction) {
if (newdir == v->last_direction) {
v->number_consecutive_turns = 0;
} else {
v->number_consecutive_turns++;
}
- v->load_unload_time_rem = 2 * _settings_game.vehicle.plane_speed;
+ v->time_counter = 2 * _settings_game.vehicle.plane_speed;
v->last_direction = v->direction;
v->direction = newdir;
}