diff options
author | rubidium <rubidium@openttd.org> | 2007-05-07 16:21:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-07 16:21:34 +0000 |
commit | 2efecd34c4237bb52981c92241a7b76c46896c4c (patch) | |
tree | 7d799b24ea0e76722a37e235c563ee818db1da54 /src/ship_cmd.cpp | |
parent | 161786e2222b67a48624e82bc9c3aabbc86e51e9 (diff) | |
download | openttd-2efecd34c4237bb52981c92241a7b76c46896c4c.tar.xz |
(svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions.
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r-- | src/ship_cmd.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index aeda55d0d..41ee5260c 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -305,31 +305,6 @@ static void ProcessShipOrder(Vehicle *v) InvalidateWindowClasses(WC_SHIPS_LIST); } -static void HandleShipLoading(Vehicle *v) -{ - switch (v->current_order.type) { - case OT_LOADING: { - if (--v->load_unload_time_rem != 0) return; - - if (LoadUnloadVehicle(v)) return; - - v->PlayLeaveStationSound(); - - Order b = v->current_order; - v->LeaveStation(); - if (!(b.flags & OF_NON_STOP)) return; - break; - } - - case OT_DUMMY: break; - - default: return; - } - - v->cur_order_index++; - InvalidateVehicleOrder(v); -} - void Ship::UpdateDeltaXY(Direction direction) { #define MKIT(a, b, c, d) ((a & 0xFF) << 24) | ((b & 0xFF) << 16) | ((c & 0xFF) << 8) | ((d & 0xFF) << 0) @@ -681,7 +656,7 @@ static void ShipController(Vehicle *v) if (v->vehstatus & VS_STOPPED) return; ProcessShipOrder(v); - HandleShipLoading(v); + v->HandleLoading(); if (v->current_order.type == OT_LOADING) return; |