diff --git a/src/engine/devcmd/cmds/RegionCmd.java b/src/engine/devcmd/cmds/RegionCmd.java index 74da48fc..7ba118eb 100644 --- a/src/engine/devcmd/cmds/RegionCmd.java +++ b/src/engine/devcmd/cmds/RegionCmd.java @@ -44,7 +44,8 @@ public class RegionCmd extends AbstractDevCmd { output += "Player Info: " + ((AbstractCharacter) target).getName() + newline; output += "Region Building: " + building.getName() + newline; output += "Region Height: " + region.lerpY((AbstractCharacter)target) + newline; - output += "is Stairs: " + region.stairs + newline; + output += "is Stairs: " + region.isStairs() + newline; + output += "is Outside: " + region.isOutside(); this.throwbackInfo(pc, output); } diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index 41169b0b..a2abf80a 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -27,6 +27,7 @@ import engine.math.Bounds; import engine.math.Vector3fImmutable; import engine.net.ByteBufferWriter; import engine.net.DispatchMessage; +import engine.net.client.msg.ErrorPopupMsg; import engine.net.client.msg.UpdateStateMsg; import engine.powers.EffectsBase; import engine.server.MBServerStatics; @@ -1007,6 +1008,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { this.inBuildingID = 0; this.inFloorID = -1; } + float terrainHeight = Terrain.getWorldHeight(value); Vector3fImmutable finalLocation = new Vector3fImmutable(value.x,terrainHeight + regionHeightOffset, value.z); super.setLoc(finalLocation); // set the location in the world diff --git a/src/engine/objects/Regions.java b/src/engine/objects/Regions.java index 0b51baca..1683003c 100644 --- a/src/engine/objects/Regions.java +++ b/src/engine/objects/Regions.java @@ -170,10 +170,10 @@ public class Regions { return true; //next region is stairs, if they are on the same level as stairs or 1 up, world object can enter. - if (toEnter.stairs) + if (toEnter.isStairs()) if (worldObject.region.level == toEnter.level || toEnter.level - 1 == worldObject.region.level) return true; - if (worldObject.region.stairs) { + if (worldObject.region.isStairs()) { boolean movingUp = false; @@ -239,7 +239,7 @@ public class Regions { return true; //cant move up a level without stairs. - if (!fromRegion.stairs) + if (!fromRegion.isStairs()) return false; boolean movingUp = false; @@ -367,7 +367,8 @@ public class Regions { } public boolean isStairs() { - return stairs; + + return this.highLerp.y - this.lowLerp.y > 0.25f; } public boolean isExit() {