From 7ed026f0881b51b386059abfd9e4f0f77abb85ec Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 26 May 2024 21:49:36 -0500 Subject: [PATCH] machine gun combat fixed --- src/engine/gameManager/CombatManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 2d224f25..a217775d 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -155,6 +155,12 @@ public enum CombatManager { } else { attackRange += attacker.calcHitBox(); } + + if(attackRange > 15 && attacker.isMoving()){ + //cannot shoot bow while moving; + return; + } + switch (target.getObjectType()) { case PlayerCharacter: attackRange += ((PlayerCharacter) target).getCharacterHeight() * 0.5f;