Skip to content

Commit

Permalink
Do not make AIs build gateway fortifications in places where they can…
Browse files Browse the repository at this point in the history
… be shot at.
  • Loading branch information
perim committed Nov 5, 2010
1 parent bd82f2b commit ba0d8f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/scriptai.c
Expand Up @@ -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.
Expand Down

0 comments on commit ba0d8f3

Please sign in to comment.