summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2007-01-13 18:55:54 +0000
committerKUDr <kudr@openttd.org>2007-01-13 18:55:54 +0000
commit9bfb3f08d95bf308eb5da9e59b9dc9fb214de6a1 (patch)
treeffa45998168a4f37d45b9d9d3e429ee18cc906c0 /src/roadveh_cmd.cpp
parent1f0206f62d478540f7b96a86999944b0cdac7492 (diff)
downloadopenttd-9bfb3f08d95bf308eb5da9e59b9dc9fb214de6a1.tar.xz
(svn r8110) -Codechange: direct Vehicle::current_order.type changes (to OT_LOADING and OT_LEAVESTATION) replaced by v->BeginLoading() and v->LeaveStation() calls. This should allow easy hooking of those state transitions in order to maintain vehicle loading queue.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 11873d97b..f5cb88121 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -750,8 +750,7 @@ static void HandleRoadVehLoading(Vehicle *v)
}
b = v->current_order;
- v->current_order.type = OT_LEAVESTATION;
- v->current_order.flags = 0;
+ v->LeaveStation();
if (!(b.flags & OF_NON_STOP)) return;
break;
}
@@ -1508,7 +1507,7 @@ again:
RoadVehArrivesAt(v, st);
old_order = v->current_order;
- v->current_order.type = OT_LOADING;
+ v->BeginLoading();
v->current_order.flags = 0;
if (old_order.type == OT_GOTO_STATION &&