anchor.diff:    //MaxW,MinW: Word;
     //B: Byte;
   begin
  -  //for Y := 1 to fMapY - 1 do
  -  //for X := 1 to fMapX - 1 do
  -  //begin
  -  //  Col := fAreas[Y,X] * 65793 OR $80000000;
  -  //  gRenderAux.Quad(X, Y, Col);
  -  //end;
  -  //PolyArr := fNavMesh.Polygons;
  -  //NodeArr := fNavMesh.Nodes;
  -  //  MaxW := 0;
  -  //  MinW := High(Word);
  -  //  for I := Low(fAreas) to High(fAreas) do
  -  //    if (fAreas[I] > MaxW) then
  -  //      MaxW := fAreas[I]
  -  //    else if (fAreas[I] < MinW) then
  -  //      MinW := fAreas[I];
  -  //  for I := Low(fAreas) to High(fAreas) do
  -  //  begin
  -  //    B := Round((fAreas[I] - MinW)/(MaxW - MinW)*255);
  -  //    Col := $FFFFFF OR (B 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;
  -
  -
  -
  -  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 $FFFFFF) OR (OwnPoly[PL,I] shl 24);
  +  {
  +  for Y := 1 to fMapY - 1 do
  +  for X := 1 to fMapX - 1 do
  +  begin
  +    Col := fAreas[Y,X] * 65793 OR $80000000;
  +    gRenderAux.Quad(X, Y, Col);
  +  end;
  +  PolyArr := fNavMesh.Polygons;
  +  NodeArr := fNavMesh.Nodes;
  +    MaxW := 0;
  +    MinW := High(Word);
  +    for I := Low(fAreas) to High(fAreas) do
  +      if (fAreas[I] > MaxW) then
  +        MaxW := fAreas[I]
  +      else if (fAreas[I] < MinW) then
  +        MinW := fAreas[I];
  +    for I := Low(fAreas) to High(fAreas) do
  +    begin
  +      B := Round((fAreas[I] - MinW)/(MaxW - MinW)*255);
  +      Col := $FFFFFF OR (B shl 24);
   
         //NavMesh polys coverage
         gRenderAux.TriangleOnTerrain(
  
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: 
  //Render debug symbols
  procedure TKMInfluences.Paint(aRect: TKMRect);
  const
    COLOR_WHITE = $FFFFFF;
    COLOR_BLACK = $000000;
    COLOR_GREEN = $00FF00;
    COLOR_RED = $0000FF;
    COLOR_YELLOW = $00FFFF;
    COLOR_BLUE = $FF0000;
  var
    PL, WatchedPL: TKMHandIndex;
    I, Cnt: Word;
  