summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-12-03 15:48:21 +0000
committerpeter1138 <peter1138@openttd.org>2006-12-03 15:48:21 +0000
commite205c58ddc66684c24517cca5c94e41b767ae7d6 (patch)
tree7fff8ddf2fb4e34463baa3c967c238f272fe2720 /train_cmd.c
parent3f3a14d24b95efe532e04c98ed5f568e97849fbb (diff)
downloadopenttd-e205c58ddc66684c24517cca5c94e41b767ae7d6.tar.xz
(svn r7330) -Fix (r7304): Data invalidation doesn't always happen as the local
player, resulting in an empty vehicle purchase list. Specify the player as an argument to IsEngineBuildable()
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 65154de6b..76ea710cd 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -743,7 +743,7 @@ int32 CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
uint num_vehicles;
/* Check if the engine-type is valid (for the player) */
- if (!IsEngineBuildable(p1, VEH_Train)) return_cmd_error(STR_ENGINE_NOT_BUILDABLE);
+ if (!IsEngineBuildable(p1, VEH_Train, _current_player)) return_cmd_error(STR_ENGINE_NOT_BUILDABLE);
/* Check if the train is actually being built in a depot belonging
* to the player. Doesn't matter if only the cost is queried */