diff --git a/src/main/java/se/urmo/game/map/GameMap.java b/src/main/java/se/urmo/game/map/GameMap.java index 11277c0..1d28f08 100644 --- a/src/main/java/se/urmo/game/map/GameMap.java +++ b/src/main/java/se/urmo/game/map/GameMap.java @@ -3,6 +3,7 @@ package se.urmo.game.map; import lombok.extern.slf4j.Slf4j; import se.urmo.game.entities.BaseAnimated; import se.urmo.game.entities.ghost.Ghost; +import se.urmo.game.entities.ghost.mode.GhostMode; import se.urmo.game.util.Direction; import java.awt.Graphics; @@ -136,8 +137,8 @@ public class GameMap { // For Ghost entities, check if this is a ghost-passable tile // You might want to refine this logic based on specific tile types or ghost states - // Example: Allow ghosts to pass through ghost house door - if (mapTile.getTileType() == TileType.DOOR) { + // Example: Allow ghosts to pass through ghost house door IF in house mode + if (mapTile.getTileType() == TileType.DOOR && ((Ghost) entity).currentMode() == GhostMode.HOUSE) { return false; // Not solid for ghosts } }