forked from MagicBane/Server
abstract character cleanup
This commit is contained in:
@@ -985,18 +985,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void setLoc(final Vector3fImmutable value) {
|
public final void setLoc(final Vector3fImmutable value) {
|
||||||
Regions region = Regions.GetRegionForTeleport(value);
|
super.setLoc(value); // set the location in the world
|
||||||
if(region != null){
|
this.resetLastSetLocUpdate();
|
||||||
float regionHeight = region.lerpY(this);
|
|
||||||
this.region = 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 {
|
|
||||||
this.region = null;
|
|
||||||
super.setLoc(value); // set the location in the world
|
|
||||||
this.resetLastSetLocUpdate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3fImmutable getMovementLoc() {
|
public Vector3fImmutable getMovementLoc() {
|
||||||
|
|||||||
Reference in New Issue
Block a user