mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-02-17 03:02:35 +01:00
Added roller glitch. See Issue #47
This commit is contained in:
parent
793d48961d
commit
60536d9fdf
@ -1737,13 +1737,21 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
|
||||
|
||||
if (item != null && itemsNewTile.contains(item))
|
||||
{
|
||||
try
|
||||
{
|
||||
item.onWalkOn(unit, room, null);
|
||||
} catch (Exception e)
|
||||
{
|
||||
Emulator.getLogging().logErrorLine(e);
|
||||
}
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (unit.getGoal() == rollerTile)
|
||||
{
|
||||
try
|
||||
{
|
||||
item.onWalkOn(unit, room, null);
|
||||
} catch (Exception e)
|
||||
{
|
||||
Emulator.getLogging().logErrorLine(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.eu.habbo.messages.outgoing.rooms.users;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.rooms.Room;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomTile;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomUnit;
|
||||
@ -62,13 +63,18 @@ public class RoomUnitOnRollerComposer extends MessageComposer
|
||||
{
|
||||
RoomTile rollerTile = room.getLayout().getTile(this.roller.getX(), this.roller.getY());
|
||||
|
||||
if (RoomUnitOnRollerComposer.this.oldLocation == rollerTile && RoomUnitOnRollerComposer.this.roomUnit.getGoal() == rollerTile)
|
||||
{
|
||||
RoomUnitOnRollerComposer.this.roomUnit.setLocation(room.getLayout().getTile(newLocation.x, newLocation.y));
|
||||
RoomUnitOnRollerComposer.this.roomUnit.setPreviousLocationZ(RoomUnitOnRollerComposer.this.newLocation.getStackHeight());
|
||||
RoomUnitOnRollerComposer.this.roomUnit.setZ(RoomUnitOnRollerComposer.this.newLocation.getStackHeight());
|
||||
RoomUnitOnRollerComposer.this.roomUnit.sitUpdate = true;
|
||||
}
|
||||
Emulator.getThreading().run(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (RoomUnitOnRollerComposer.this.oldLocation == rollerTile && RoomUnitOnRollerComposer.this.roomUnit.getGoal() == rollerTile)
|
||||
{
|
||||
RoomUnitOnRollerComposer.this.roomUnit.setLocation(room.getLayout().getTile(newLocation.x, newLocation.y));
|
||||
RoomUnitOnRollerComposer.this.roomUnit.setPreviousLocationZ(RoomUnitOnRollerComposer.this.newLocation.getStackHeight());
|
||||
RoomUnitOnRollerComposer.this.roomUnit.setZ(RoomUnitOnRollerComposer.this.newLocation.getStackHeight());
|
||||
RoomUnitOnRollerComposer.this.roomUnit.sitUpdate = true;
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user