mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
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:
commit
616b25f159
@ -124,7 +124,10 @@ public class InteractionBattleBanzaiPuck extends InteractionPushable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean validMove(Room room, RoomTile from, RoomTile to) {
|
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())));
|
//return !(!room.getLayout().tileWalkable(to.x, to.y) || (topItem != null && (!topItem.getBaseItem().setAllowStack() || topItem.getBaseItem().allowSit() || topItem.getBaseItem().allowLay())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user