summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-01-15 09:28:08 +0000
committercelestar <celestar@openttd.org>2005-01-15 09:28:08 +0000
commit3f74c9884e893de018b7d20851e5272c096ce8ce (patch)
treec6a836c94525b32278cec41cf3492cfdb6d8c481 /aircraft_cmd.c
parentdd6db7306904d9fa66d81910e2784467057d7a0d (diff)
downloadopenttd-3f74c9884e893de018b7d20851e5272c096ce8ce.tar.xz
(svn r1521) -Fix: Ship Vehicle Lists are now redrawn correctly
-Codechange: added some const to last commit -Codechange: Ship and Aircraft lists are now update on order change, not on new day
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 5157e5f61..4fa94a345 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -508,13 +508,13 @@ static void CheckIfAircraftNeedsService(Vehicle *v)
}
}
-void InvalidateAircraftWindows(Vehicle *v)
+void InvalidateAircraftWindows(const Vehicle *v)
{
- Order *o;
+ const Order *o;
InvalidateWindow(WC_AIRCRAFT_LIST, v->owner);
- for ( o = v->schedule_ptr; o->type != OT_NOTHING; o++, i++) {
+ for ( o = v->schedule_ptr; o->type != OT_NOTHING; o++) {
if (o->type == OT_GOTO_STATION ) {
InvalidateWindow(WC_AIRCRAFT_LIST, o->station << 16 | v->owner);
}
@@ -548,8 +548,6 @@ void OnNewDay_Aircraft(Vehicle *v)
SubtractMoneyFromPlayerFract(v->owner, cost);
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
-
- InvalidateAircraftWindows(v);
}
void AircraftYearlyLoop()
@@ -1084,6 +1082,8 @@ static void ProcessAircraftOrder(Vehicle *v)
}
InvalidateVehicleOrderWidget(v);
+
+ InvalidateAircraftWindows(v);
}
static void HandleAircraftLoading(Vehicle *v, int mode)