From abda002690a8ee7e073e8728a56db6ef18594b6f Mon Sep 17 00:00:00 2001 From: Evan Debenham <Evan.SHPX@gmail.com> Date: Fri, 19 May 2017 18:20:17 -0400 Subject: [PATCH] v0.6.0: fixed tall grass being placed over items and enemies --- .../levels/painters/RegularPainter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java index 2b6e5e097..ccc274720 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java @@ -295,6 +295,11 @@ public abstract class RegularPainter extends Painter { //Full range is 8.3% to 75%, but most commonly (20% fill with 3 smoothing) is around 60% //low smoothing, or very low fill, will begin to push the ratio down, normally to 50-30% for (int i : grassCells) { + if (l.heaps.get(i) != null || l.findMob(i) != null) { + l.map[i] = Terrain.GRASS; + continue; + } + int count = 1; for (int n : PathFinder.NEIGHBOURS8) { if (grass[i + n]) {