commented out all my last changes to hunt down out of sync
This commit is contained in:
parent
1595eb3043
commit
4a70d090a8
|
@ -2346,9 +2346,9 @@ bool UnitUpdater::unitOnRange(const Unit *unit, int range, Unit **rangedPtr,
|
||||||
|
|
||||||
//attack enemies that can attack first
|
//attack enemies that can attack first
|
||||||
float distToUnit=-1;
|
float distToUnit=-1;
|
||||||
float distToStandingUnit=-1;
|
//TT float distToStandingUnit=-1;
|
||||||
Unit* enemySeen = NULL;
|
Unit* enemySeen = NULL;
|
||||||
Unit* attackingEnemySeen = NULL;
|
//TT Unit* attackingEnemySeen = NULL;
|
||||||
for(int i = 0; i< enemies.size(); ++i) {
|
for(int i = 0; i< enemies.size(); ++i) {
|
||||||
Unit *enemy = enemies[i];
|
Unit *enemy = enemies[i];
|
||||||
|
|
||||||
|
@ -2370,32 +2370,29 @@ bool UnitUpdater::unitOnRange(const Unit *unit, int range, Unit **rangedPtr,
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ctCpuUltra,
|
//TT
|
||||||
// ctCpuMega,
|
// if(unit->getFaction()->getControlType()==ctCpuUltra ||
|
||||||
|
// unit->getFaction()->getControlType()==ctCpuMega) {
|
||||||
if(unit->getFaction()->getControlType()==ctCpuUltra ||
|
// if(distToStandingUnit < 0 || currentDist< distToStandingUnit) {
|
||||||
unit->getFaction()->getControlType()==ctCpuMega) {
|
// if(enemies[i]->getCurrSkill()!=NULL && enemies[i]->getCurrSkill()->getClass()==scAttack) {
|
||||||
if(distToStandingUnit < 0 || currentDist< distToStandingUnit) {
|
// distToStandingUnit = currentDist;
|
||||||
if(enemies[i]->getCurrSkill()!=NULL && enemies[i]->getCurrSkill()->getClass()==scAttack) {
|
// attackingEnemySeen=enemies[i];
|
||||||
distToStandingUnit = currentDist;
|
// }
|
||||||
attackingEnemySeen=enemies[i];
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
}
|
|
||||||
//break;
|
//break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
random.randRange(0, 1);
|
//TT if(unit->getFaction()->getControlType()==ctCpuUltra ||
|
||||||
if(unit->getFaction()->getControlType()==ctCpuUltra ||
|
// unit->getFaction()->getControlType()==ctCpuMega) {
|
||||||
unit->getFaction()->getControlType()==ctCpuMega) {
|
// if( attackingEnemySeen!=NULL && random.randRange(0,2)!=2 ) {
|
||||||
if( attackingEnemySeen!=NULL && random.randRange(0,2)>0 ) {
|
// *rangedPtr = attackingEnemySeen;
|
||||||
*rangedPtr = attackingEnemySeen;
|
// enemySeen = attackingEnemySeen;
|
||||||
enemySeen = attackingEnemySeen;
|
// //printf("Da hat er wen gefunden:%s\n",enemySeen->getType()->getName(false).c_str());
|
||||||
//printf("Da hat er wen gefunden:%s\n",enemySeen->getType()->getName(false).c_str());
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if(enemies[i]->getType()->hasSkillClass(scAttack) &&
|
if(enemies[i]->getType()->hasSkillClass(scAttack) &&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user