Better way to check if player is over water while dismounting.

This commit is contained in:
MobiusDevelopment
2021-03-29 09:55:56 +00:00
parent 8b870c80cb
commit ea17fe727c
21 changed files with 21 additions and 189 deletions

View File

@@ -6041,15 +6041,7 @@ public class PlayerInstance extends Playable
public boolean dismount()
{
WaterZone water = null;
for (ZoneType zone : ZoneManager.getInstance().getZones(getX(), getY(), getZ() - 300))
{
if (zone instanceof WaterZone)
{
water = (WaterZone) zone;
}
}
if (water == null)
if (ZoneManager.getInstance().getZone(getX(), getY(), getZ() - 300, WaterZone.class) == null)
{
if (!isInWater() && (getZ() > 10000))
{