From 48402a31a9ad77d0d156d798beb67df53feedc8b Mon Sep 17 00:00:00 2001 From: Allexit Date: Sun, 10 May 2015 23:41:48 +0300 Subject: [PATCH] Dummy now hits up constantly. Also fixed a funny bug Dummy now hits up constantly, and fixed a bug where all other creatures able for combat, would stop hitting very politely, and wait for the player to stop. --- core/src/com/saltosion/gladiator/GladiatorBrawler.java | 2 ++ core/src/com/saltosion/gladiator/systems/CombatSystem.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/com/saltosion/gladiator/GladiatorBrawler.java b/core/src/com/saltosion/gladiator/GladiatorBrawler.java index e04491b..c7b0294 100644 --- a/core/src/com/saltosion/gladiator/GladiatorBrawler.java +++ b/core/src/com/saltosion/gladiator/GladiatorBrawler.java @@ -17,6 +17,7 @@ import com.saltosion.gladiator.systems.MiscManagerSystem; import com.saltosion.gladiator.systems.PhysicsSystem; import com.saltosion.gladiator.systems.RenderingSystem; import com.saltosion.gladiator.util.AppUtil; +import com.saltosion.gladiator.util.Direction; import com.saltosion.gladiator.util.Global; import com.saltosion.gladiator.util.Name; import com.saltosion.gladiator.util.SpriteLoader; @@ -121,6 +122,7 @@ public class GladiatorBrawler extends ApplicationAdapter { })); engine.addEntity(dummy); + dummy.getComponent(CCombat.class).inputs.put(Direction.UP, true); } public void initializeLevel() { diff --git a/core/src/com/saltosion/gladiator/systems/CombatSystem.java b/core/src/com/saltosion/gladiator/systems/CombatSystem.java index 14dea62..2cb3493 100644 --- a/core/src/com/saltosion/gladiator/systems/CombatSystem.java +++ b/core/src/com/saltosion/gladiator/systems/CombatSystem.java @@ -39,7 +39,7 @@ public class CombatSystem extends EntitySystem { if (combat.swingCdCounter > 0) { combat.swingCdCounter -= deltaTime; - } if (combat.swingCdCounter > 0) { return; } + } if (combat.swingCdCounter > 0) { continue; } // Ready to swing !