mirror of
https://github.com/glest/glest-source.git
synced 2025-09-25 15:09:03 +02:00
Making it a bit random if standing or runnning units are attacked by Ultra/Mega CPUs
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user