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/roadveh_cmd.cpp | |
parent | 161786e2222b67a48624e82bc9c3aabbc86e51e9 (diff) | |
download | openttd-2efecd34c4237bb52981c92241a7b76c46896c4c.tar.xz |
(svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 390a14d30..d87688600 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -753,31 +753,6 @@ static void ProcessRoadVehOrder(Vehicle *v) InvalidateVehicleOrder(v); } -static void HandleRoadVehLoading(Vehicle *v) -{ - switch (v->current_order.type) { - case OT_LOADING: { - Order b; - - if (--v->load_unload_time_rem != 0) return; - - if (LoadUnloadVehicle(v)) return; - - 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); -} - static void StartRoadVehSound(const Vehicle* v) { if (!PlayVehicleSound(v, VSE_START)) { @@ -1304,7 +1279,7 @@ static void RoadVehController(Vehicle *v) if (v->vehstatus & VS_STOPPED) return; ProcessRoadVehOrder(v); - HandleRoadVehLoading(v); + v->HandleLoading(); if (v->current_order.type == OT_LOADING) return; |