diff options
author | rubidium <rubidium@openttd.org> | 2007-09-09 11:30:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-09 11:30:44 +0000 |
commit | 30b38198702b1f0ec97e4a6c5150e9c1c5303139 (patch) | |
tree | 4a8cf7c555cc9c0052e74a5e949f2da0e5d43d8a /src/unmovable_cmd.cpp | |
parent | 40b871410b557aa8fdf6c2ea1d872a2563c922ab (diff) | |
download | openttd-30b38198702b1f0ec97e4a6c5150e9c1c5303139.tar.xz |
(svn r11069) -Codechange: allow slopes under statues. Patch by kaan.
Diffstat (limited to 'src/unmovable_cmd.cpp')
-rw-r--r-- | src/unmovable_cmd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index ee486cbfa..c3495d715 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -110,6 +110,8 @@ CommandCost CmdBuildCompanyHQ(TileIndex tile, uint32 flags, uint32 p1, uint32 p2 return cost; } +static Foundation GetFoundation_Unmovable(TileIndex tile, Slope tileh); + static void DrawTile_Unmovable(TileInfo *ti) { @@ -132,6 +134,9 @@ static void DrawTile_Unmovable(TileInfo *ti) } 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); AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, HASBIT(_transparent_opt, TO_STRUCTURES)); |