mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r1382) Make automatic placement of rails in front of train depots map size agnostic
This commit is contained in:
parent
e31da8532e
commit
9294d33611
@ -73,8 +73,6 @@ static void PlaceRail_AutoRail(uint tile)
|
||||
VpStartPlaceSizing(tile, VPM_RAILDIRS);
|
||||
}
|
||||
|
||||
static int16 _place_depot_offs_xy[4] = { -1, 0x100, 1, -0x100};
|
||||
|
||||
static void PlaceExtraDepotRail(uint tile, uint16 extra)
|
||||
{
|
||||
byte b = _map5[tile];
|
||||
@ -100,7 +98,7 @@ void CcRailDepot(bool success, uint tile, uint32 p1, uint32 p2)
|
||||
SndPlayTileFx(SND_20_SPLAT_2, tile);
|
||||
ResetObjectToPlace();
|
||||
|
||||
tile += _place_depot_offs_xy[dir];
|
||||
tile += _tileoffs_by_dir[dir];
|
||||
|
||||
if (IS_TILETYPE(tile, MP_RAILWAY)) {
|
||||
PlaceExtraDepotRail(tile, _place_depot_extra[dir]);
|
||||
|
Loading…
Reference in New Issue
Block a user