forked from MagicBane/Server
interest management
This commit is contained in:
@@ -5234,11 +5234,13 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if(!this.timestamps.containsKey("nextReload")){
|
if(!this.timestamps.containsKey("nextReload")){
|
||||||
this.timestamps.put("nextReload",System.currentTimeMillis() + 5000L);
|
this.timestamps.put("nextReload",System.currentTimeMillis() + 5000);
|
||||||
}else{
|
}else{
|
||||||
if(this.timestamps.get("nextReload") > System.currentTimeMillis()) {
|
if(this.timestamps.get("nextReload") < System.currentTimeMillis()) {
|
||||||
this.setDirtyLoad(true);
|
this.setDirtyLoad(true);
|
||||||
|
InterestManager.setObjectDirty(this);
|
||||||
InterestManager.INTERESTMANAGER.RefreshLoadedObjects(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))
|
if(pc.equals(player))
|
||||||
continue;
|
continue;
|
||||||
pc.isBoxed = true;
|
pc.isBoxed = true;
|
||||||
|
InterestManager.setObjectDirty(pc);
|
||||||
|
pc.setDirtyLoad(true);
|
||||||
}
|
}
|
||||||
player.isBoxed = false;
|
player.isBoxed = false;
|
||||||
|
InterestManager.setObjectDirty(player);
|
||||||
|
player.setDirtyLoad(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean checkIfBoxed(PlayerCharacter player){
|
public static boolean checkIfBoxed(PlayerCharacter player){
|
||||||
|
|||||||
Reference in New Issue
Block a user