summaryrefslogtreecommitdiff
path: root/src
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
commita6df995fbb4cbcb379eca903ca2758bfc1ddde6e (patch)
treea3dabda7ed35a6e408d61b8aa1c05d126942cb94 /src
parent633b15caf3f616f7778ca153573097fcb7fdfad0 (diff)
downloadopenttd-a6df995fbb4cbcb379eca903ca2758bfc1ddde6e.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')
-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 */