summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 445530008..64e92d28f 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -118,6 +118,10 @@ int32 CmdBuildRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (!IsEngineBuildable(p1, VEH_Road)) return CMD_ERROR;
+ if (!IsRoadDepotTile((TileIndex)tile)) return CMD_ERROR;
+
+ if (_map_owner[tile] != _current_player) return CMD_ERROR;
+
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
cost = EstimateRoadVehCost(p1);