openttd updated to 1.5.0-beta2
--HG-- branch : openttd
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: rail_cmd.cpp 26317 2014-02-07 23:48:56Z frosch $ */
|
||||
/* $Id: rail_cmd.cpp 27157 2015-02-22 14:01:24Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "table/railtypes.h"
|
||||
#include "table/track_land.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
/** Helper type for lists/vectors of trains */
|
||||
typedef SmallVector<Train *, 16> TrainList;
|
||||
|
||||
@@ -951,7 +953,7 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
CommandCost cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
||||
if (cost.Failed()) return cost;
|
||||
|
||||
if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||
if (IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||
|
||||
if (!Depot::CanAllocateItem()) return CMD_ERROR;
|
||||
|
||||
@@ -1686,13 +1688,11 @@ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
YapfNotifyTrackLayoutChange(tile, track);
|
||||
YapfNotifyTrackLayoutChange(endtile, track);
|
||||
|
||||
MarkTileDirtyByTile(tile);
|
||||
MarkTileDirtyByTile(endtile);
|
||||
|
||||
if (IsBridge(tile)) {
|
||||
TileIndexDiff delta = TileOffsByDiagDir(GetTunnelBridgeDirection(tile));
|
||||
TileIndex t = tile + delta;
|
||||
for (; t != endtile; t += delta) MarkTileDirtyByTile(t); // TODO encapsulate this into a function
|
||||
MarkBridgeDirty(tile);
|
||||
} else {
|
||||
MarkTileDirtyByTile(tile);
|
||||
MarkTileDirtyByTile(endtile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2441,9 +2441,6 @@ void DrawTrainDepotSprite(int x, int y, int dir, RailType railtype)
|
||||
SpriteID image = rti->UsesOverlay() ? SPR_FLAT_GRASS_TILE : dts->ground.sprite;
|
||||
uint32 offset = rti->GetRailtypeSpriteOffset();
|
||||
|
||||
x += 33;
|
||||
y += 17;
|
||||
|
||||
if (image != SPR_FLAT_GRASS_TILE) image += offset;
|
||||
PaletteID palette = COMPANY_SPRITE_COLOUR(_local_company);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user