anchor.diff:  
     if aUpdateWalkConnects then
       UpdateWalkConnect([wcWalk, wcRoad, wcWork], KMRectGrow(fBoundsWC, 1), False);
  +end;
  +
  +
  +//Flatten terrain loc
  +procedure TKMTerrain.FlattenTerrain(const Loc: TKMPoint; aUpdateWalkConnects: Boolean = True; aIgnoreCanElevate: Boolean = False);
  +var
  +  depth: Byte;
  +begin
  +  depth := 0;
  +  DoFlattenTerrain(Loc, depth, aUpdateWalkConnects, aIgnoreCanElevate);
   end;
   
   
  
positive.code:   //All 9 tiles around and including this one could have become unwalkable and made a unit stuck, so check them all
    for I := Max(Loc.Y-1, 1) to Min(Loc.Y+1, fMapY-1) do
      for K := Max(Loc.X-1, 1) to Min(Loc.X+1, fMapX-1) do
        EnsureWalkable(K, I);
  
    UpdateLighting(KMRect(Loc.X-2, Loc.Y-2, Loc.X+3, Loc.Y+3));
    //Changing height will affect the cells around this one
  
negative.code:     and not fMapEditor //Allow units to become "stuck" in MapEd, as height changing is allowed anywhere
      then
        //This recursive call should be garanteed to exit, as eventually the terrain will be flat enough
        DoFlattenTerrain(KMPoint(aX,aY), aDepth, False, aIgnoreCanElevate or (aDepth > FLATTEN_RECUR_USE_ELEVATE_MAX_DEPTH)); //WalkConnect should be done at the end
    end;
  
    function CanElevateAt(aX, aY: Word): Boolean;
  