region work
This commit is contained in:
@@ -179,7 +179,7 @@ public abstract class AbstractWorldObject extends AbstractGameObject {
|
||||
if (region.center.y == region.highLerp.y)
|
||||
worldObject.loc = worldObject.loc.setY(region.center.y + worldObject.getAltitude());
|
||||
else
|
||||
worldObject.loc = worldObject.loc.setY(region.lerpY(worldObject) + worldObject.getAltitude());
|
||||
worldObject.loc = worldObject.loc.setY(region.lerpY(worldObject.loc) + worldObject.getAltitude());
|
||||
|
||||
return region;
|
||||
}
|
||||
@@ -504,7 +504,7 @@ public abstract class AbstractWorldObject extends AbstractGameObject {
|
||||
this.loc = loc;
|
||||
|
||||
if(this instanceof AbstractCharacter && this.region != null){
|
||||
this.loc = this.loc.setY(this.region.lerpY(this) + this.getAltitude());
|
||||
this.loc = this.loc.setY(this.region.lerpY(this.loc) + this.getAltitude());
|
||||
} else{
|
||||
this.loc = this.loc.setY(Terrain.getWorldHeight(this.getLoc()) + this.getAltitude());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user