From a206a281640b04c9f59e292b69a5d68282d88be4 Mon Sep 17 00:00:00 2001 From: narzo <127-narzo62@users.noreply.git.krews.org> Date: Fri, 1 May 2020 20:52:46 -0400 Subject: [PATCH] Fix InteractionBattleBanzaiPuck cannot be moved when in a corner --- .../games/battlebanzai/InteractionBattleBanzaiPuck.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/battlebanzai/InteractionBattleBanzaiPuck.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/battlebanzai/InteractionBattleBanzaiPuck.java index 5c28cda7..67436d2a 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/battlebanzai/InteractionBattleBanzaiPuck.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/battlebanzai/InteractionBattleBanzaiPuck.java @@ -124,7 +124,10 @@ public class InteractionBattleBanzaiPuck extends InteractionPushable { @Override public boolean validMove(Room room, RoomTile from, RoomTile to) { - return room != null && from != null && to != null; + if (to == null) return false; + HabboItem topItem = room.getTopItemAt(to.x, to.y, this); + return !(!room.getLayout().tileWalkable(to.x, to.y) || (topItem != null && (!topItem.getBaseItem().allowStack() || topItem.getBaseItem().allowSit() || topItem.getBaseItem().allowLay()))); + //return !(!room.getLayout().tileWalkable(to.x, to.y) || (topItem != null && (!topItem.getBaseItem().setAllowStack() || topItem.getBaseItem().allowSit() || topItem.getBaseItem().allowLay()))); }