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

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());
}