mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Merge branch 'bugfix/vendingmachine-npe' into 'dev'
Fixed NPE when a vendingmachine is facing a wall where the user can't reach it See merge request morningstar/Arcturus-Community!299
This commit is contained in:
commit
c270c46c13
@ -34,8 +34,12 @@ public class InteractionVendingMachine extends HabboItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public THashSet<RoomTile> getActivatorTiles(Room room) {
|
public THashSet<RoomTile> getActivatorTiles(Room room) {
|
||||||
THashSet<RoomTile> tiles = new THashSet<RoomTile>();
|
THashSet<RoomTile> tiles = new THashSet<>();
|
||||||
tiles.add(getSquareInFront(room.getLayout(), this));
|
RoomTile tileInFront = getSquareInFront(room.getLayout(), this);
|
||||||
|
|
||||||
|
if (tileInFront != null)
|
||||||
|
tiles.add(tileInFront);
|
||||||
|
|
||||||
tiles.add(room.getLayout().getTile(this.getX(), this.getY()));
|
tiles.add(room.getLayout().getTile(this.getX(), this.getY()));
|
||||||
return tiles;
|
return tiles;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user