forked from MagicBane/Server
player update bug
This commit is contained in:
@@ -5147,33 +5147,14 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
this.updateLocation();
|
||||
this.updateMovementState();
|
||||
|
||||
if(!newSystem) {
|
||||
if(!this.timestamps.containsKey("SetDirty")){
|
||||
this.timestamps.put("SetDirty", System.currentTimeMillis());
|
||||
}else if (this.timestamps.get("SetDirty") + 5000L < System.currentTimeMillis()) {
|
||||
LoadCharacterMsg lcm = new LoadCharacterMsg(this, PlayerCharacter.hideNonAscii());
|
||||
if (lcm != null) {
|
||||
//Dispatch dispatch = Dispatch.borrow(this, lcm);
|
||||
//DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchMessage.dispatchMsgToInterestArea(this,lcm,DispatchChannel.PRIMARY,MBServerStatics.CHARACTER_LOAD_RANGE,true,false);
|
||||
}
|
||||
this.timestamps.put("SetDirty", System.currentTimeMillis());
|
||||
}
|
||||
if(!newSystem)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
|
||||
if (this.updateLock.writeLock().tryLock()) {
|
||||
|
||||
//if(!this.timestamps.containsKey("SetDirty")){
|
||||
// this.timestamps.put("SetDirty", System.currentTimeMillis());
|
||||
//}else if (this.timestamps.get("SetDirty") + 5000L < System.currentTimeMillis()){
|
||||
// InterestManager.setObjectDirty(this);
|
||||
// InterestManager.reloadCharacter(this,false);
|
||||
// this.timestamps.put("SetDirty", System.currentTimeMillis());
|
||||
//}
|
||||
|
||||
try {
|
||||
|
||||
if (this.isAlive() && this.isActive && this.enteredWorld) {
|
||||
@@ -5203,12 +5184,12 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
if(this.isActive && this.enteredWorld) {
|
||||
if (!this.timestamps.containsKey("nextBoxCheck"))
|
||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 1000);
|
||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
|
||||
|
||||
if(!this.isBoxed && this.timestamps.get("nextBoxCheck") < System.currentTimeMillis()) {
|
||||
//updateBoxStatus(checkIfBoxed(this));
|
||||
this.isBoxed = checkIfBoxed(this);
|
||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 1000);
|
||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
|
||||
}
|
||||
|
||||
if (this.level < 10 && this.enteredWorld) {
|
||||
@@ -5945,7 +5926,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
if (this.timestamps.get("SyncClient") + 5000L < System.currentTimeMillis()) {
|
||||
this.syncClient();
|
||||
this.timestamps.put("SyncClient", System.currentTimeMillis());
|
||||
InterestManager.setObjectDirty(this);
|
||||
//InterestManager.setObjectDirty(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user