1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 21:19:10 +00:00

(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()
This commit is contained in:
2006-12-03 15:48:21 +00:00
parent 3f3a14d24b
commit e205c58ddc
8 changed files with 11 additions and 10 deletions

View File

@@ -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 */