mele / player location sync

This commit is contained in:
2025-03-11 19:39:04 -05:00
parent 011ceea598
commit 32563e3f5f
2 changed files with 24 additions and 7 deletions
+12 -7
View File
@@ -5144,17 +5144,23 @@ public class PlayerCharacter extends AbstractCharacter {
@Override
public void update(Boolean newSystem) {
if(!newSystem)
this.updateLocation();
this.updateMovementState();
if(!newSystem)
return;
try {
if (this.updateLock.writeLock().tryLock()) {
this.updateMovementState();
this.updateLocation();
if(!this.timestamps.containsKey("SetDirty")){
this.timestamps.put("SetDirty", System.currentTimeMillis());
}else if (this.timestamps.get("SetDirty") + 5000L < System.currentTimeMillis()){
InterestManager.setObjectDirty(this);
this.timestamps.put("SetDirty", System.currentTimeMillis());
}
try {
if (this.isAlive() && this.isActive && this.enteredWorld) {
@@ -5197,8 +5203,7 @@ public class PlayerCharacter extends AbstractCharacter {
}
}
if (this.isBoxed){// && !this.containsEffect(1672601862)) {
//PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
if (this.isBoxed){
if(!this.title.equals(CharacterTitle.PVE)){
this.title = CharacterTitle.PVE;
InterestManager.setObjectDirty(this);