mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(svn r11069) -Codechange: allow slopes under statues. Patch by kaan.
This commit is contained in:
parent
643ffb270c
commit
8b46bc7b98
@ -1928,7 +1928,8 @@ static bool DoBuildStatueOfCompany(TileIndex tile, TownID town_id)
|
|||||||
PlayerID old;
|
PlayerID old;
|
||||||
CommandCost r;
|
CommandCost r;
|
||||||
|
|
||||||
if (GetTileSlope(tile, NULL) != SLOPE_FLAT) return false;
|
/* Statues can be build on slopes, just like houses. Only the steep slopes is a no go. */
|
||||||
|
if (IsSteepSlope(GetTileSlope(tile, NULL))) return false;
|
||||||
|
|
||||||
if (!IsTileType(tile, MP_HOUSE) &&
|
if (!IsTileType(tile, MP_HOUSE) &&
|
||||||
!IsTileType(tile, MP_CLEAR) &&
|
!IsTileType(tile, MP_CLEAR) &&
|
||||||
|
@ -110,6 +110,8 @@ CommandCost CmdBuildCompanyHQ(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
|
|||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Foundation GetFoundation_Unmovable(TileIndex tile, Slope tileh);
|
||||||
|
|
||||||
static void DrawTile_Unmovable(TileInfo *ti)
|
static void DrawTile_Unmovable(TileInfo *ti)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -132,6 +134,9 @@ static void DrawTile_Unmovable(TileInfo *ti)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case UNMOVABLE_STATUE:
|
case UNMOVABLE_STATUE:
|
||||||
|
/* This should prevent statues from sinking into the ground when on a slope. */
|
||||||
|
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, GetFoundation_Unmovable(ti->tile, ti->tileh));
|
||||||
|
|
||||||
DrawGroundSprite(SPR_CONCRETE_GROUND, PAL_NONE);
|
DrawGroundSprite(SPR_CONCRETE_GROUND, PAL_NONE);
|
||||||
|
|
||||||
AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, HASBIT(_transparent_opt, TO_STRUCTURES));
|
AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, HASBIT(_transparent_opt, TO_STRUCTURES));
|
||||||
|
Loading…
Reference in New Issue
Block a user