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 | a84ca16dc4f2c9d84bd5c7ae1c69ff7c321b067e (patch) | |
tree | 7d799b24ea0e76722a37e235c563ee818db1da54 /src/roadveh_cmd.cpp | |
parent | 2813b4440baec0866b243b83c45211b8b1fd3dec (diff) | |
download | openttd-a84ca16dc4f2c9d84bd5c7ae1c69ff7c321b067e.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; |