Browse Source

machine gun combat fixed

combat-2
FatBoy-DOTC 6 months ago
parent
commit
7ed026f088
  1. 6
      src/engine/gameManager/CombatManager.java

6
src/engine/gameManager/CombatManager.java

@ -155,6 +155,12 @@ public enum CombatManager {
} else { } else {
attackRange += attacker.calcHitBox(); attackRange += attacker.calcHitBox();
} }
if(attackRange > 15 && attacker.isMoving()){
//cannot shoot bow while moving;
return;
}
switch (target.getObjectType()) { switch (target.getObjectType()) {
case PlayerCharacter: case PlayerCharacter:
attackRange += ((PlayerCharacter) target).getCharacterHeight() * 0.5f; attackRange += ((PlayerCharacter) target).getCharacterHeight() * 0.5f;

Loading…
Cancel
Save