@@ -687,25 +687,25 @@ int32 CmdBuildTrainDepot(int x, int y, u
return_cmd_error(STR_0007_FLAT_LAND_REQUIRED);
}
ret = DoCommandByTile(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (CmdFailed(ret)) return CMD_ERROR;
cost = ret;
d = AllocateDepot();
if (d == NULL)
return CMD_ERROR;
if (flags & DC_EXEC) {
if (_current_player == _local_player) _last_built_train_depot_tile = tile;
if (IsLocalPlayer()) _last_built_train_depot_tile = tile;
ModifyTile(tile,
MP_SETTYPE(MP_RAILWAY) |
MP_MAP3LO | MP_MAPOWNER_CURRENT | MP_MAP5,
p1, /* map3_lo */
p2 | RAIL_TYPE_DEPOT_WAYPOINT /* map5 */
);
d->xy = tile;
d->town_index = ClosestTownFromTile(tile, (uint)-1)->index;
SetSignalsOnBothDir(tile, (p2&1) ? 2 : 1);