fixed a bug where Stargate.teleport() wouldn't call Tile.onEntry()

This commit is contained in:
Kjistóf 2016-05-14 00:03:47 +02:00
parent 89a1da497f
commit 9d551ad376
1 changed files with 5 additions and 1 deletions

View File

@ -71,7 +71,11 @@ public class Stargate {
public void teleport(PlayerBase player) {
if(isOpen())
player.setCurrentTile(other.getCurrentWall().getAdjacentTile(other.getExitDirection()));
{
Tile exit = other.getCurrentWall().getAdjacentTile(other.getExitDirection());
player.setCurrentTile(exit);
exit.onEntry(player);
}
else
player.setCurrentTile(this.getCurrentWall());
}