forked from MagicBane/Server
region height work
This commit is contained in:
@@ -11,6 +11,7 @@ package engine.objects;
|
||||
|
||||
import engine.Enum;
|
||||
import engine.Enum.*;
|
||||
import engine.InterestManagement.HeightMap;
|
||||
import engine.InterestManagement.InterestManager;
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.exception.SerializationException;
|
||||
@@ -986,8 +987,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
public final void setLoc(final Vector3fImmutable value) {
|
||||
Regions region = Regions.GetRegionForTeleport(value);
|
||||
if(region != null){
|
||||
float regionHeight = region.lerpY(this);
|
||||
this.region = region;
|
||||
Vector3fImmutable newValue = new Vector3fImmutable(value.x,value.y + region.lerpY(this),value.z); //account for height offset of the current character region
|
||||
Vector3fImmutable newValue = new Vector3fImmutable(value.x,regionHeight,value.z); //account for height offset of the current character region
|
||||
super.setLoc(newValue); // set the location in the world
|
||||
this.resetLastSetLocUpdate();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user