diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 86d1254f..5cdab19b 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -471,27 +471,24 @@ public enum CombatManager { //Range check. if(abstractCharacter.isMoving()){ - range += (abstractCharacter.getSpeed() * 0.1f); + range += (abstractCharacter.getSpeed() * 0.1f); // add movement vector offset for moving attacker } if(AbstractWorldObject.IsAbstractCharacter(target)) { AbstractCharacter tarAc = (AbstractCharacter) target; if(tarAc != null && tarAc.isMoving()){ - range += (tarAc.getSpeed() * 0.1f); + range += (tarAc.getSpeed() * 0.1f); // add movement vector offset for moving target } } - float attackerHitBox = abstractCharacter.calcHitBox(); + float attackerHitBox = abstractCharacter.calcHitBox(); // add attacker hitbox 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; + targetHitBox = targetCharacter.calcHitBox(); // add target hitbox } - range += attackerHitBox + targetHitBox; + range += attackerHitBox + targetHitBox + 2.5f; // offset standard range to sync where client tries to stop if (NotInRange(abstractCharacter, target, range)) { diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index aac7146d..a44faf44 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -1046,7 +1046,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject { if (MBServerStatics.COMBAT_TARGET_HITBOX_DEBUG) { Logger.info("Hit box radius for " + this.getFirstName() + " is " + (this.statStrCurrent / 200f)); } - return ((PlayerCharacter) this).getStrForClient() / 200f; + int strength = ((PlayerCharacter) this).statStrBase; + float radius = strength * 0.1f * 0.5f; + return radius; //TODO CALCULATE MOB HITBOX BECAUSE FAIL EMU IS FAIL!!!!!!! } else if (this.getObjectType() == GameObjectType.Mob) { if (MBServerStatics.COMBAT_TARGET_HITBOX_DEBUG) {