Disable avatar rotation with vending machines if on a chair

This commit is contained in:
Alejandro 2020-06-07 15:49:26 +03:00
parent 2af52de0ca
commit 0a0091e563

View File

@ -164,6 +164,11 @@ public class InteractionVendingMachine extends HabboItem {
}
private void rotateToMachine(RoomUnit unit) {
if (unit.getCurrentLocation().getState() != RoomTileState.OPEN) {
// if sitting on a chair or laying on a bed, skip rotating altogether
return;
}
RoomUserRotation rotation = RoomUserRotation.values()[Rotation.Calculate(unit.getX(), unit.getY(), this.getX(), this.getY())];
boolean onlyHead = false;