@@ -45,7 +45,7 @@ static bool CheckAllowRemoveRoad(TileInd
if (_game_mode == GM_EDITOR) return true;
// Only do the special processing for actual players.
if (_current_player >= MAX_PLAYERS) return true;
if (!IsValidPlayer(_current_player)) return true;
owner = IsLevelCrossingTile(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile);
@@ -289,7 +289,7 @@ int32 CmdBuildRoad(TileIndex tile, uint3
/* Road pieces are max 4 bitset values (NE, NW, SE, SW) and town can only be non-zero
* if a non-player is building the road */
if ((p1 >> 4) || (_current_player < MAX_PLAYERS && p2 != 0) || !IsValidTownID(p2)) return CMD_ERROR;
if ((p1 >> 4) || (IsValidPlayer(_current_player) && p2 != 0) || !IsValidTownID(p2)) return CMD_ERROR;
pieces = p1;
tileh = GetTileSlope(tile, NULL);