summaryrefslogtreecommitdiff
path: root/src/landscape.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-07-17 16:09:38 +0000
committerfrosch <frosch@openttd.org>2011-07-17 16:09:38 +0000
commit718e0090b21ee6eca2ea2d177382081fac948710 (patch)
treee7e44234a6506bf01e294578448c9700602d8a29 /src/landscape.cpp
parentd55b380b695c184a6bfc99790f8ff738c84867cc (diff)
downloadopenttd-718e0090b21ee6eca2ea2d177382081fac948710.tar.xz
(svn r22670) -Change: Do not spawn explosion effects when bulldozing in paused mode. They block the view.
Diffstat (limited to 'src/landscape.cpp')
-rw-r--r--src/landscape.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp
index c60bf8bc3..d095dec53 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -690,9 +690,10 @@ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
}
DoCommand(t, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
- /* draw explosion animation... */
+ /* draw explosion animation...
+ * Disable explosions when game is paused. Looks silly and blocks the view. */
TileIndex off = t - ta.tile;
- if ((TileX(off) == 0 || TileX(off) == ta.w - 1U) && (TileY(off) == 0 || TileY(off) == ta.h - 1U)) {
+ if ((TileX(off) == 0 || TileX(off) == ta.w - 1U) && (TileY(off) == 0 || TileY(off) == ta.h - 1U) && _pause_mode == PM_UNPAUSED) {
/* big explosion in each corner, or small explosion for single tiles */
CreateEffectVehicleAbove(TileX(t) * TILE_SIZE + TILE_SIZE / 2, TileY(t) * TILE_SIZE + TILE_SIZE / 2, 2,
ta.w == 1 && ta.h == 1 ? EV_EXPLOSION_SMALL : EV_EXPLOSION_LARGE