fixed a bug where Stargate.teleport() wouldn't call Tile.onEntry()
This commit is contained in:
		@@ -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());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user