mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Merge branch 'patch-wired-effect-move-rotate' into 'dev'
[patch] Fixed move-and-rotate wired should not allow movement into allow-sit furni See merge request morningstar/Arcturus-Community!69
This commit is contained in:
commit
d32aec4d52
@ -69,7 +69,6 @@ public class WiredEffectMoveRotateFurni extends InteractionWiredEffect {
|
|||||||
rotationToAdd = 6;
|
rotationToAdd = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int newRotation = ((item.getRotation() + rotationToAdd) % 8) % (item.getBaseItem().getWidth() > 1 || item.getBaseItem().getLength() > 1 ? 4 : 8);
|
int newRotation = ((item.getRotation() + rotationToAdd) % 8) % (item.getBaseItem().getWidth() > 1 || item.getBaseItem().getLength() > 1 ? 4 : 8);
|
||||||
@ -162,7 +161,7 @@ public class WiredEffectMoveRotateFurni extends InteractionWiredEffect {
|
|||||||
for (short y = (short) rectangle.y; y < rectangle.y + rectangle.getHeight(); y++) {
|
for (short y = (short) rectangle.y; y < rectangle.y + rectangle.getHeight(); y++) {
|
||||||
RoomTile tile = layout.getTile(x, y);
|
RoomTile tile = layout.getTile(x, y);
|
||||||
|
|
||||||
if (tile == null || tile.state == RoomTileState.INVALID || !tile.getAllowStack()) {
|
if (tile == null || tile.state == RoomTileState.INVALID || tile.state == RoomTileState.BLOCKED || !tile.getAllowStack()) {
|
||||||
validMove = false;
|
validMove = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -181,9 +180,13 @@ public class WiredEffectMoveRotateFurni extends InteractionWiredEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HabboItem i = room.getTopItemAt(x, y, item);
|
HabboItem i = room.getTopItemAt(x, y, item);
|
||||||
if (i == null || i == item || i.getBaseItem().allowStack()) {
|
if (i != null && !i.getBaseItem().allowStack()) {
|
||||||
offset = Math.max(room.getStackHeight(newTile.x, newTile.y, false, item) - item.getZ(), offset);
|
validMove = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
offset = Math.max(room.getStackHeight(newTile.x, newTile.y, false, item) - item.getZ(), offset);
|
||||||
|
|
||||||
tilesToUpdate.add(tile);
|
tilesToUpdate.add(tile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user