diff options
author | bjarni <bjarni@openttd.org> | 2007-03-08 21:39:34 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2007-03-08 21:39:34 +0000 |
commit | 0ad237611e9d3809160364cad75e401aad5b8b10 (patch) | |
tree | cfdbc180c9140ada4cb0bc22da9defe931609d16 /src/roadveh_cmd.cpp | |
parent | e2eeac06f80a8295f8f9919be8bf6927541d540b (diff) | |
download | openttd-0ad237611e9d3809160364cad75e401aad5b8b10.tar.xz |
(svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index f056ef6bf..af50dc9b9 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -682,8 +682,7 @@ static void ProcessRoadVehOrder(Vehicle *v) order = GetVehicleOrder(v, v->cur_order_index); if (order == NULL) { - v->current_order.type = OT_NOTHING; - v->current_order.flags = 0; + v->current_order.Free(); v->dest_tile = 0; ClearSlot(v); return; @@ -1618,8 +1617,7 @@ again: v->cur_speed = 0; return; } - v->current_order.type = OT_NOTHING; - v->current_order.flags = 0; + v->current_order.Free(); ClearSlot(v); } |