Browse Source

abstract character cleanup

feature-region-set
FatBoy-DOTC 1 year ago
parent
commit
a004c247ab
  1. 10
      src/engine/objects/AbstractCharacter.java

10
src/engine/objects/AbstractCharacter.java

@ -985,19 +985,9 @@ 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);
if(region != null){
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 super.setLoc(value); // set the location in the world
this.resetLastSetLocUpdate(); this.resetLastSetLocUpdate();
} }
}
public Vector3fImmutable getMovementLoc() { public Vector3fImmutable getMovementLoc() {

Loading…
Cancel
Save