mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Merge branch 'fix-rollers-causing-dead-tiles' into 'dev'
Fixed rollers causing dead tiles and wired recognizing user on roller See merge request morningstar/Arcturus-Community!102
This commit is contained in:
commit
615c7dde8b
@ -1499,11 +1499,10 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
if (unit.hasStatus(RoomUnitStatus.MOVE))
|
if (unit.hasStatus(RoomUnitStatus.MOVE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
RoomTile tile = tileInFront.copy();
|
double newZ = unit.getZ() + zOffset;
|
||||||
tile.setStackHeight(unit.getZ() + zOffset);
|
|
||||||
|
|
||||||
if (roomUserRolledEvent != null && unit.getRoomUnitType() == RoomUnitType.USER) {
|
if (roomUserRolledEvent != null && unit.getRoomUnitType() == RoomUnitType.USER) {
|
||||||
roomUserRolledEvent = new UserRolledEvent(getHabbo(unit), roller, tile);
|
roomUserRolledEvent = new UserRolledEvent(getHabbo(unit), roller, tileInFront);
|
||||||
Emulator.getPluginManager().fireEvent(roomUserRolledEvent);
|
Emulator.getPluginManager().fireEvent(roomUserRolledEvent);
|
||||||
|
|
||||||
if (roomUserRolledEvent.isCancelled())
|
if (roomUserRolledEvent.isCancelled())
|
||||||
@ -1518,10 +1517,10 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
RideablePet riding = rollingHabbo.getHabboInfo().getRiding();
|
RideablePet riding = rollingHabbo.getHabboInfo().getRiding();
|
||||||
if (riding != null) {
|
if (riding != null) {
|
||||||
RoomUnit ridingUnit = riding.getRoomUnit();
|
RoomUnit ridingUnit = riding.getRoomUnit();
|
||||||
tile.setStackHeight(ridingUnit.getZ() + zOffset);
|
newZ = ridingUnit.getZ() + zOffset;
|
||||||
rolledUnitIds.add(ridingUnit.getId());
|
rolledUnitIds.add(ridingUnit.getId());
|
||||||
updatedUnit.remove(ridingUnit);
|
updatedUnit.remove(ridingUnit);
|
||||||
messages.add(new RoomUnitOnRollerComposer(ridingUnit, roller, ridingUnit.getCurrentLocation(), ridingUnit.getZ(), tile, tile.getStackHeight(), room));
|
messages.add(new RoomUnitOnRollerComposer(ridingUnit, roller, ridingUnit.getCurrentLocation(), ridingUnit.getZ(), tileInFront, newZ, room));
|
||||||
isRiding = true;
|
isRiding = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1530,7 +1529,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
usersRolledThisTile.add(unit.getId());
|
usersRolledThisTile.add(unit.getId());
|
||||||
rolledUnitIds.add(unit.getId());
|
rolledUnitIds.add(unit.getId());
|
||||||
updatedUnit.remove(unit);
|
updatedUnit.remove(unit);
|
||||||
messages.add(new RoomUnitOnRollerComposer(unit, roller, unit.getCurrentLocation(), unit.getZ() + (isRiding ? 1 : 0), tile, tile.getStackHeight() + (isRiding ? 1 : 0), room));
|
messages.add(new RoomUnitOnRollerComposer(unit, roller, unit.getCurrentLocation(), unit.getZ() + (isRiding ? 1 : 0), tileInFront, newZ + (isRiding ? 1 : 0), room));
|
||||||
|
|
||||||
if (itemsOnRoller.isEmpty()) {
|
if (itemsOnRoller.isEmpty()) {
|
||||||
HabboItem item = room.getTopItemAt(tileInFront.x, tileInFront.y);
|
HabboItem item = room.getTopItemAt(tileInFront.x, tileInFront.y);
|
||||||
|
Loading…
Reference in New Issue
Block a user