summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-09-26 19:01:57 +0000
committerfrosch <frosch@openttd.org>2008-09-26 19:01:57 +0000
commit436011dda3717f990f84cc4dd18790efd7dae367 (patch)
tree789fd001b7b192070bbf9d05ee657a1d4d91c7e4
parent804185d392605c065d70479b5a59f5c823bd1462 (diff)
downloadopenttd-436011dda3717f990f84cc4dd18790efd7dae367.tar.xz
(svn r14403) -Fix (r14384): The condition was too restrictive.
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 24d85b643..928c94128 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1122,7 +1122,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
}
/* When we move the front vehicle, the second vehicle might need a unitnumber */
- if (!HasBit(p2, 0) && (IsFreeWagon(src) || IsFrontEngine(src)) && (flags & DC_AUTOREPLACE) == 0) {
+ if (!HasBit(p2, 0) && (IsFreeWagon(src) || (IsFrontEngine(src) && dst == NULL)) && (flags & DC_AUTOREPLACE) == 0) {
Vehicle *second = GetNextUnit(src);
if (second != NULL && IsTrainEngine(second) && GetFreeUnitNumber(VEH_TRAIN) > _settings_game.vehicle.max_trains) {
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);