add region height to world height in setLoc

This commit is contained in:
2023-09-13 20:48:02 -05:00
parent 1fdd0a1b32
commit 200318ddcf
+1 -1
View File
@@ -987,7 +987,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
Regions region = Regions.GetRegionForTeleport(value);
if(region != null){
this.region = region;
Vector3fImmutable newValue = new Vector3fImmutable(value.x,region.lerpY(this),value.z); //account for height offset of the current character region
Vector3fImmutable newValue = new Vector3fImmutable(value.x,value.y + region.lerpY(this),value.z); //account for height offset of the current character region
super.setLoc(newValue); // set the location in the world
this.resetLastSetLocUpdate();
} else {