mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 12:22:36 +01:00
Fix rollers with setspeed 0. Closes #90
This commit is contained in:
parent
df5c761d2d
commit
7b8aeeec6a
@ -63,18 +63,14 @@ public class RoomUnitOnRollerComposer extends MessageComposer
|
|||||||
{
|
{
|
||||||
RoomTile rollerTile = room.getLayout().getTile(this.roller.getX(), this.roller.getY());
|
RoomTile rollerTile = room.getLayout().getTile(this.roller.getX(), this.roller.getY());
|
||||||
|
|
||||||
Emulator.getThreading().run(new Runnable() {
|
Emulator.getThreading().run(() -> {
|
||||||
@Override
|
if (RoomUnitOnRollerComposer.this.oldLocation == rollerTile && RoomUnitOnRollerComposer.this.roomUnit.getGoal() == rollerTile) {
|
||||||
public void run() {
|
RoomUnitOnRollerComposer.this.roomUnit.setLocation(room.getLayout().getTile(newLocation.x, newLocation.y));
|
||||||
if (RoomUnitOnRollerComposer.this.oldLocation == rollerTile && RoomUnitOnRollerComposer.this.roomUnit.getGoal() == rollerTile)
|
RoomUnitOnRollerComposer.this.roomUnit.setPreviousLocationZ(RoomUnitOnRollerComposer.this.newLocation.getStackHeight());
|
||||||
{
|
RoomUnitOnRollerComposer.this.roomUnit.setZ(RoomUnitOnRollerComposer.this.newLocation.getStackHeight());
|
||||||
RoomUnitOnRollerComposer.this.roomUnit.setLocation(room.getLayout().getTile(newLocation.x, newLocation.y));
|
RoomUnitOnRollerComposer.this.roomUnit.sitUpdate = true;
|
||||||
RoomUnitOnRollerComposer.this.roomUnit.setPreviousLocationZ(RoomUnitOnRollerComposer.this.newLocation.getStackHeight());
|
|
||||||
RoomUnitOnRollerComposer.this.roomUnit.setZ(RoomUnitOnRollerComposer.this.newLocation.getStackHeight());
|
|
||||||
RoomUnitOnRollerComposer.this.roomUnit.sitUpdate = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, 500);
|
}, this.room.getRollerSpeed() == 0 ? 250 : 500);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user