interest management

This commit is contained in:
2025-03-17 20:00:59 -05:00
parent 7eb6535051
commit 04a2d6fb1c
+8 -2
View File
@@ -5234,11 +5234,13 @@ public class PlayerCharacter extends AbstractCharacter {
}
if(!this.timestamps.containsKey("nextReload")){
this.timestamps.put("nextReload",System.currentTimeMillis() + 5000L);
this.timestamps.put("nextReload",System.currentTimeMillis() + 5000);
}else{
if(this.timestamps.get("nextReload") > System.currentTimeMillis()) {
if(this.timestamps.get("nextReload") < System.currentTimeMillis()) {
this.setDirtyLoad(true);
InterestManager.setObjectDirty(this);
InterestManager.INTERESTMANAGER.RefreshLoadedObjects(this);
this.timestamps.put("nextReload",System.currentTimeMillis() + 5000);
}
}
@@ -5264,8 +5266,12 @@ public class PlayerCharacter extends AbstractCharacter {
if(pc.equals(player))
continue;
pc.isBoxed = true;
InterestManager.setObjectDirty(pc);
pc.setDirtyLoad(true);
}
player.isBoxed = false;
InterestManager.setObjectDirty(player);
player.setDirtyLoad(true);
}
public static boolean checkIfBoxed(PlayerCharacter player){