summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-01-07 10:57:32 +0000
committertruelight <truelight@openttd.org>2006-01-07 10:57:32 +0000
commit58acfeacaa2c08433da15b4583ff5bd19d76801f (patch)
tree817c9bdd7d45d8909965164b5f92b97316397fe8 /train_cmd.c
parent2ee4c11f1a63f06d2a70ffe4be1eb64d9b8c0b19 (diff)
downloadopenttd-58acfeacaa2c08433da15b4583ff5bd19d76801f.tar.xz
(svn r3381) -Fix: r3374 left one bug: allow moving around wagons in a 100 long train
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 7ae6b10ff..09d074afe 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1005,7 +1005,9 @@ int32 CmdMoveRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
r = CheckTrainStoppedInDepot(dst_head);
if (r < 0) return CMD_ERROR;
- num += r;
+ /* If we move in the same vehicle, it is okay */
+ if (dst_head != src_head)
+ num += r;
assert(dst_head->tile == src_head->tile);
}