summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-10-28 23:34:42 +0000
committerrubidium <rubidium@openttd.org>2008-10-28 23:34:42 +0000
commitc936cda4de2902b7b1447c8e4192ce236fd167e9 (patch)
treea3dabda7ed35a6e408d61b8aa1c05d126942cb94 /src/roadveh_cmd.cpp
parentdb1fd2e0850d3720ac715df9b86107011a9657fd (diff)
downloadopenttd-c936cda4de2902b7b1447c8e4192ce236fd167e9.tar.xz
(svn r14545) -Fix [FS#2386]: road vehicles sometimes never got their "slots" deallocated causing RVs not going to depot for service.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 14681fc32..214d4f120 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1796,7 +1796,10 @@ again:
return false;
}
- if (v->current_order.IsType(OT_LEAVESTATION) && IsDriveThroughStopTile(v->tile)) v->current_order.Free();
+ if (v->current_order.IsType(OT_LEAVESTATION) && IsDriveThroughStopTile(v->tile)) {
+ v->current_order.Free();
+ ClearSlot(v);
+ }
/* Move to next frame unless vehicle arrived at a stop position
* in a depot or entered a tunnel/bridge */