diff --git a/src/micropolisj/engine/Bulldozer.java b/src/micropolisj/engine/Bulldozer.java index 26e773a..2455119 100644 --- a/src/micropolisj/engine/Bulldozer.java +++ b/src/micropolisj/engine/Bulldozer.java @@ -100,8 +100,8 @@ class Bulldozer extends ToolStroke continue; tile = tile & LOMASK; if (tile != RADTILE && tile != DIRT) { - int nTile = (TINYEXP + city.PRNG.nextInt(3)) - | ANIMBIT | BULLBIT; + int z = inPreview ? 0 : city.PRNG.nextInt(3); + int nTile = (TINYEXP + z) | ANIMBIT | BULLBIT; eff.setTile(xx, yy, nTile); } } diff --git a/src/micropolisj/engine/ToolStroke.java b/src/micropolisj/engine/ToolStroke.java index 522ce0a..6db34da 100644 --- a/src/micropolisj/engine/ToolStroke.java +++ b/src/micropolisj/engine/ToolStroke.java @@ -19,6 +19,7 @@ public class ToolStroke int ypos; int xdest; int ydest; + boolean inPreview; ToolStroke(Micropolis city, MicropolisTool tool, int xpos, int ypos) { @@ -33,7 +34,13 @@ public class ToolStroke public final ToolPreview getPreview() { ToolEffect eff = new ToolEffect(city); - applyArea(eff); + inPreview = true; + try { + applyArea(eff); + } + finally { + inPreview = false; + } return eff.preview; } @@ -232,7 +239,7 @@ public class ToolStroke } } - int z = city.PRNG.nextInt(5); + int z = inPreview ? 0 : city.PRNG.nextInt(5); int tile; if (z < 4) { tile = (WOODS2 + z) | BURNBIT | BULLBIT;