mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 23:10:52 +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) {
|
||||
THashSet<RoomTile> tiles = new THashSet<RoomTile>();
|
||||
tiles.add(getSquareInFront(room.getLayout(), this));
|
||||
THashSet<RoomTile> tiles = new THashSet<>();
|
||||
RoomTile tileInFront = getSquareInFront(room.getLayout(), this);
|
||||
|
||||
if (tileInFront != null)
|
||||
tiles.add(tileInFront);
|
||||
|
||||
tiles.add(room.getLayout().getTile(this.getX(), this.getY()));
|
||||
return tiles;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user