Do not make AIs build gateway fortifications in places where they can be shot at.

master
Per Inge Mathisen 2010-11-05 21:39:07 +01:00
parent bd82f2b8e2
commit ba0d8f3509
1 changed files with 6 additions and 0 deletions

View File

@ -1841,6 +1841,12 @@ static BOOL defenseLocation(BOOL variantB)
psChosenGate = NULL;
for (psGate = gwGetGateways(); psGate; psGate = psGate->psNext)
{
MAPTILE *psTile = mapTile(psGate->x1, psGate->y1);
if (psTile->threatBits & (1 << player))
{
continue; // enemy can shoot there, not safe to build
}
count = 0;
noWater = true;
// does it have >1 tile unoccupied.