anchor.diff:  begin
     Xc:=trunc(inX);
     Yc:=trunc(inY);
  +  if not TileInMapCoords(Xc,Yc) then
  +  Tmp1:=0;
     Tmp1:=mix(fTerrain.Land[Yc  ,Xc+1].Height, fTerrain.Land[Yc  ,Xc].Height, frac(InX));
     Tmp2:=mix(fTerrain.Land[Yc+1,Xc+1].Height, fTerrain.Land[Yc+1,Xc].Height, frac(InX));
     Result:=mix(Tmp2, Tmp1, frac(InY));
  
positive.code:   // - next to last node is neighbour of LocB (important for delivery to workers),
    // - last node is LocB
  
    if NodeCount>3 then begin
    k:=2;
    for i:=3 to NodeCount-1 do begin //simplify within LocA+1 .. LocB-2 range
    // i/k are always -1 since array is [0..Count-1] range
  
negative.code:   for i:=Pos.Y-Radius to Pos.Y+Radius do for k:=Pos.X-Radius to Pos.X+Radius do
    if (VerticeInMapCoords(k,i,1))and(GetLength(Pos,KMPoint(k,i))<=Radius) then
      Land[i,k].FogOfWar[byte(PlayerID)] := min(Land[i,k].FogOfWar[byte(PlayerID)] + Amount,TERRAIN_FOG_OF_WAR_MAX);
  end;
  
  
  {Reveal whole map}
  procedure TTerrain.RevealWholeMap(PlayerID:TPlayerID);
  var i,k:integer;
  begin
    if not InRange(byte(PlayerID),1,8) then exit;
    for i:=1 to MapY do for k:=1 to MapX do
      Land[i,k].FogOfWar[byte(PlayerID)] := TERRAIN_FOG_OF_WAR_MAX;
  end;
  
  
  