Attack commands can now be queued

This commit is contained in:
mathusummut
2019-02-03 22:53:55 +01:00
parent 5f0c7e16bf
commit 5c0a704013
2 changed files with 3 additions and 3 deletions

View File

@@ -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) {

View File

@@ -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<Unit*> &enemies);
//void enemiesAtDistance(const Unit *unit, const Unit *priorityUnit, int distance, vector<Unit*> &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));