mele / player location sync
This commit is contained in:
@@ -481,6 +481,18 @@ public enum CombatManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float attackerHitBox = abstractCharacter.calcHitBox();
|
||||||
|
float targetHitBox = 0.0f;
|
||||||
|
if(AbstractCharacter.IsAbstractCharacter(target)){
|
||||||
|
AbstractCharacter targetCharacter = (AbstractCharacter)target;
|
||||||
|
targetHitBox = targetCharacter.calcHitBox();
|
||||||
|
}else if(target.getObjectType().equals(GameObjectType.Building)){
|
||||||
|
Building targetBuilding = (Building)target;
|
||||||
|
targetHitBox = targetBuilding.getBounds().getHalfExtents().x;
|
||||||
|
}
|
||||||
|
|
||||||
|
range += attackerHitBox + targetHitBox;
|
||||||
|
|
||||||
if (NotInRange(abstractCharacter, target, range)) {
|
if (NotInRange(abstractCharacter, target, range)) {
|
||||||
|
|
||||||
//target is in stealth and can't be seen by source
|
//target is in stealth and can't be seen by source
|
||||||
|
|||||||
@@ -5144,17 +5144,23 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
@Override
|
@Override
|
||||||
public void update(Boolean newSystem) {
|
public void update(Boolean newSystem) {
|
||||||
|
|
||||||
if(!newSystem)
|
|
||||||
this.updateLocation();
|
|
||||||
|
|
||||||
this.updateMovementState();
|
|
||||||
|
|
||||||
if(!newSystem)
|
if(!newSystem)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (this.updateLock.writeLock().tryLock()) {
|
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 {
|
try {
|
||||||
|
|
||||||
if (this.isAlive() && this.isActive && this.enteredWorld) {
|
if (this.isAlive() && this.isActive && this.enteredWorld) {
|
||||||
@@ -5197,8 +5203,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isBoxed){// && !this.containsEffect(1672601862)) {
|
if (this.isBoxed){
|
||||||
//PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
|
|
||||||
if(!this.title.equals(CharacterTitle.PVE)){
|
if(!this.title.equals(CharacterTitle.PVE)){
|
||||||
this.title = CharacterTitle.PVE;
|
this.title = CharacterTitle.PVE;
|
||||||
InterestManager.setObjectDirty(this);
|
InterestManager.setObjectDirty(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user