anchor.diff:          NodeArr[PolyArr[I].Indices[2]].Loc.X,
           NodeArr[PolyArr[I].Indices[2]].Loc.Y, Col);
       end;
  +  //}
  +
  +
  +
  +  if not AI_GEN_NAVMESH OR not AI_GEN_INFLUENCE_MAPS then
  +    Exit;
  +
  +  if OVERLAY_AVOID then
  +    for Y := aRect.Top to aRect.Bottom do
  +    for X := aRect.Left to aRect.Right do
  +    begin
  +      Col := AvoidBuilding[Y,X] * 65793 OR $80000000;
  +      gRenderAux.Quad(X, Y, Col);
  +    end;
  +
  +  if (OVERLAY_INFLUENCE OR OVERLAY_OWNERSHIP) AND not OVERLAY_AI_COMBAT then
  +  begin
  +    PolyArr := fNavMesh.Polygons;
  +    NodeArr := fNavMesh.Nodes;
  +    for I := 0 to fPolygons - 1 do
  +    begin
  +      PL := GetBestOwner(I);
  +      if (PL = PLAYER_NONE) then
  +        continue
  +      else
  +        Col := (gHands[PL].FlagColor AND COLOR_WHITE) OR (OwnPoly[PL,I] shl 24);
  +
  +      //NavMesh polys coverage
  +      gRenderAux.TriangleOnTerrain(
  +        NodeArr[PolyArr[I].Indices[0]].Loc.X,
  +        NodeArr[PolyArr[I].Indices[0]].Loc.Y,
  +        NodeArr[PolyArr[I].Indices[1]].Loc.X,
  +        NodeArr[PolyArr[I].Indices[1]].Loc.Y,
  +        NodeArr[PolyArr[I].Indices[2]].Loc.X,
  +        NodeArr[PolyArr[I].Indices[2]].Loc.Y, Col);
  +    end;
     end;
   
     if (OVERLAY_INFLUENCE OR OVERLAY_OWNERSHIP) AND OVERLAY_AI_COMBAT then
  
positive.code:         end;
        end;
      end;
      //for I := 0 to fPolygons - 1 do
      //begin
      //  BestCnt := 0;
      //  for PL := 0 to gHands.Count - 1 do
      //  begin
      //    Cnt := PresenceAllGroups[PL,I];
      //    if (Cnt > BestCnt) then
      //    begin
      //      BestCnt := Cnt;
      //      if (WatchedPL = PL) then
      //        Col := $0000FF00 // Green
      //      else if (gHands[WatchedPL].Alliances[PL] = at_Ally) then
      //        Col := $00FF0000 // Blue
      //      else
      //        Col := $000000FF; // Red
      //    end;
      //  end;
      //  if (BestCnt > 0) then
      //  begin
      //    BestCnt := Min(BestCnt,$9F);
      //    //NavMesh polys coverage
      //    gRenderAux.TriangleOnTerrain(
      //      NodeArr[PolyArr[I].Indices[0]].Loc.X,
      //      NodeArr[PolyArr[I].Indices[0]].Loc.Y,
      //      NodeArr[PolyArr[I].Indices[1]].Loc.X,
      //      NodeArr[PolyArr[I].Indices[1]].Loc.Y,
      //      NodeArr[PolyArr[I].Indices[2]].Loc.X,
      //      NodeArr[PolyArr[I].Indices[2]].Loc.Y, (Col OR (BestCnt shl 24)) );
      //  end;
      //end;
    end;
  end;
  
  
negative.code:     for PL := 0 to gHands.Count - 1 do
      begin
        if (WatchedPL = PL) then
          Col := COLOR_GREEN
        else if (gHands[WatchedPL].Alliances[PL] = at_Ally) then
          Col := COLOR_BLUE
        else
          Col := COLOR_RED;
  
        for I := 0 to fPolygons - 1 do
        begin
  