fixed a bug where Stargate.teleport() wouldn't call Tile.onEntry()
This commit is contained in:
parent
89a1da497f
commit
9d551ad376
@ -71,7 +71,11 @@ public class Stargate {
|
|||||||
|
|
||||||
public void teleport(PlayerBase player) {
|
public void teleport(PlayerBase player) {
|
||||||
if(isOpen())
|
if(isOpen())
|
||||||
player.setCurrentTile(other.getCurrentWall().getAdjacentTile(other.getExitDirection()));
|
{
|
||||||
|
Tile exit = other.getCurrentWall().getAdjacentTile(other.getExitDirection());
|
||||||
|
player.setCurrentTile(exit);
|
||||||
|
exit.onEntry(player);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
player.setCurrentTile(this.getCurrentWall());
|
player.setCurrentTile(this.getCurrentWall());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user