Making it a bit random if standing or runnning units are attacked by Ultra/Mega CPUs

This commit is contained in:
Titus Tscharntke 2012-05-30 21:53:41 +00:00
parent 00b1bea1ac
commit b8401bf208
1 changed files with 3 additions and 1 deletions

View File

@ -2386,9 +2386,11 @@ bool UnitUpdater::unitOnRange(const Unit *unit, int range, Unit **rangedPtr,
}
}
}
random.randRange(0, 1);
if(unit->getFaction()->getControlType()==ctCpuUltra ||
unit->getFaction()->getControlType()==ctCpuMega) {
if(attackingEnemySeen!=NULL) {
if( attackingEnemySeen!=NULL && random.randRange(0,2)>0 ) {
*rangedPtr = attackingEnemySeen;
enemySeen = attackingEnemySeen;
//printf("Da hat er wen gefunden:%s\n",enemySeen->getType()->getName(false).c_str());