From 5c0a7040133f8c5618de59701245d555a04bae4a Mon Sep 17 00:00:00 2001 From: mathusummut Date: Sun, 3 Feb 2019 22:53:55 +0100 Subject: [PATCH] Attack commands can now be queued --- source/game/world/unit_updater.cpp | 4 ++-- source/game/world/unit_updater.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/game/world/unit_updater.cpp b/source/game/world/unit_updater.cpp index a1948ab41..92c70183e 100644 --- a/source/game/world/unit_updater.cpp +++ b/source/game/world/unit_updater.cpp @@ -726,7 +726,7 @@ namespace Game { if (SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance, "In [%s::%s Line: %d] took msecs: %lld\n", __FILE__, __FUNCTION__, __LINE__, chrono.getMillis()); - if ((command->getUnit() == NULL || !(command->getUnit()->isAlive())) && unit->getCommandSize() > 1) { + /*if ((command->getUnit() == NULL || !(command->getUnit()->isAlive())) && unit->getCommandSize() > 1) { if (frameIndex < 0) { unit->finishCommand(); // all queued "ground attacks" are skipped if somthing else is queued after them. @@ -738,7 +738,7 @@ namespace Game { } } return; - } + }*/ //if found //if(frameIndex < 0) { diff --git a/source/game/world/unit_updater.h b/source/game/world/unit_updater.h index 3fa04445e..244c4be86 100644 --- a/source/game/world/unit_updater.h +++ b/source/game/world/unit_updater.h @@ -157,7 +157,7 @@ namespace Game { bool attackableOnSight(Unit *unit, Unit **enemyPtr, const AttackSkillType *ast, bool evalMode = false); bool attackableOnRange(Unit *unit, Unit **enemyPtr, const AttackSkillType *ast, bool evalMode = false); bool unitOnRange(Unit *unit, int range, Unit **enemyPtr, const AttackSkillType *ast, bool evalMode = false); - void enemiesAtDistance(const Unit *unit, const Unit *priorityUnit, int distance, vector &enemies); + //void enemiesAtDistance(const Unit *unit, const Unit *priorityUnit, int distance, vector &enemies); void spawn(Unit *unit, string spawnUnit, int spawnUnitcount, int healthMin, int healthMax, int probability); void spawnAttack(Unit *unit, string spawnUnit, int spawnUnitcount, int healthMin, int healthMax, int probability, bool spawnUnitAtTarget, Vec2i targetPos = Vec2i(-10, -10));