- updated the AI's scouting logic
- updated from transifex
This commit is contained in:
parent
bf468a39e1
commit
b2be14ca33
|
@ -738,15 +738,22 @@ void Ai::sendScoutPatrol(){
|
||||||
|
|
||||||
std::vector<Vec2i> warningEnemyList = aiInterface->getEnemyWarningPositionList();
|
std::vector<Vec2i> warningEnemyList = aiInterface->getEnemyWarningPositionList();
|
||||||
if(warningEnemyList.empty() == false) {
|
if(warningEnemyList.empty() == false) {
|
||||||
for(int i = warningEnemyList.size() - 1; i <= 0; --i) {
|
// Randomly check the enemy warning location list
|
||||||
|
if(random.randRange(0, 1) == 1) {
|
||||||
|
//for(int i = warningEnemyList.size() - 1; i <= 0; --i) {
|
||||||
|
|
||||||
|
// randomly pick a location from the location list
|
||||||
|
int i = random.randRange(0, warningEnemyList.size() - 1);
|
||||||
|
|
||||||
Vec2i &checkPos = warningEnemyList[i];
|
Vec2i &checkPos = warningEnemyList[i];
|
||||||
pos = checkPos;
|
pos = checkPos;
|
||||||
possibleTargetFound = true;
|
possibleTargetFound = true;
|
||||||
aiInterface->removeEnemyWarningPositionFromList(checkPos);
|
aiInterface->removeEnemyWarningPositionFromList(checkPos);
|
||||||
break;
|
// break;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( megaResourceAttack || ultraResourceAttack) {
|
if(possibleTargetFound == false && (megaResourceAttack || ultraResourceAttack)) {
|
||||||
Map *map= aiInterface->getMap();
|
Map *map= aiInterface->getMap();
|
||||||
|
|
||||||
const TechTree *tt= aiInterface->getTechTree();
|
const TechTree *tt= aiInterface->getTechTree();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user