Merge branch 'dev' into 'dev'

Fix InteractionBattleBanzaiPuck cannot be moved when in a corner

See merge request morningstar/Arcturus-Community!132
This commit is contained in:
Harmonic 2020-05-02 10:26:57 -04:00
commit 616b25f159

View File

@ -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())));
}