|
|
@ -170,10 +170,10 @@ public class Regions { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
//next region is stairs, if they are on the same level as stairs or 1 up, world object can enter.
|
|
|
|
//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) |
|
|
|
if (worldObject.region.level == toEnter.level || toEnter.level - 1 == worldObject.region.level) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
if (worldObject.region.stairs) { |
|
|
|
if (worldObject.region.isStairs()) { |
|
|
|
|
|
|
|
|
|
|
|
boolean movingUp = false; |
|
|
|
boolean movingUp = false; |
|
|
|
|
|
|
|
|
|
|
@ -239,7 +239,7 @@ public class Regions { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
//cant move up a level without stairs.
|
|
|
|
//cant move up a level without stairs.
|
|
|
|
if (!fromRegion.stairs) |
|
|
|
if (!fromRegion.isStairs()) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
boolean movingUp = false; |
|
|
|
boolean movingUp = false; |
|
|
@ -367,7 +367,8 @@ public class Regions { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isStairs() { |
|
|
|
public boolean isStairs() { |
|
|
|
return stairs; |
|
|
|
|
|
|
|
|
|
|
|
return this.highLerp.y - this.lowLerp.y > 0.25f; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isExit() { |
|
|
|
public boolean isExit() { |
|
|
|