diff options
author | rubidium <rubidium@openttd.org> | 2007-05-06 14:59:01 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-06 14:59:01 +0000 |
commit | 9a893ebe20768fcb4d707738339249d40874575c (patch) | |
tree | 1cb12a860a1d49d0f55ca151829a324e5d880a14 /src/roadveh_cmd.cpp | |
parent | b219b7b53a764350f30f38bbd6dff733d25284fc (diff) | |
download | openttd-9a893ebe20768fcb4d707738339249d40874575c.tar.xz |
(svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index c11e9c530..43664a6ff 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -761,10 +761,7 @@ static void HandleRoadVehLoading(Vehicle *v) if (--v->load_unload_time_rem != 0) return; - if (CanFillVehicle(v)) { - LoadUnloadVehicle(v); - return; - } + if (LoadUnloadVehicle(v)) return; b = v->current_order; v->LeaveStation(); |