anchor.diff:  begin
     fCountCompact := 0;
     for I := 0 to gRes.MapElements.Count - 1 do
  -    if (I <> OBJ_BLOCK) and (gMapElements[I].Anim.Count > 0) and (gMapElements[I].Anim.Step[1] > 0)
  +    if (I <> OBJ_BLOCK_TAG) and (gMapElements[I].Anim.Count > 0) and (gMapElements[I].Anim.Step[1] > 0)
         and (gMapElements[I].Stump = -1) then //Hide falling trees and invisible wall (61)
       begin
         fCompactToMapElem[fCountCompact] := I; //pointer
  
positive.code:     end;
    ObjectErase := TKMButtonFlat.Create(Panel_Objects, 9, 4, 32, 32, 340);
    ObjectErase.Hint := GetHintWHotkey(TX_MAPED_TERRAIN_OBJECTS_REMOVE, SC_MAPEDIT_SUB_MENU_ACTION_1);
    ObjectErase.Tag := OBJ_NONE; //no object
    ObjectErase.OnClick := ObjectsChange;
  
    ObjectBlock := TKMButtonFlat.Create(Panel_Objects, TB_MAP_ED_WIDTH-32, 4, 32, 32, 254,rxTrees);
    ObjectBlock.Hint := GetHintWHotkey(TX_MAPED_TERRAIN_OBJECTS_BLOCK, SC_MAPEDIT_SUB_MENU_ACTION_2);
    ObjectBlock.Tag := OBJ_BLOCK; //block object
    ObjectBlock.OnClick := ObjectsChange;
  
    ObjectsPalette_Button := TKMButtonFlat.Create(Panel_Objects, 7, 320, TB_MAP_ED_WIDTH - 7, 21, 0);
  
negative.code: begin
    //Skip indexes out of range
    if not InRange(aObjIndex, 0, fCountCompact - 1)
      and (aObjIndex <> OBJ_BLOCK_TAG)
      and (aObjIndex <> OBJ_NONE_TAG) then
      Exit;
  
    gGameCursor.Mode := cmObjects;
    case aObjIndex of
      OBJ_BLOCK_TAG:  gGameCursor.Tag1 := OBJ_BLOCK; //Block
      OBJ_NONE_TAG:   gGameCursor.Tag1 := OBJ_NONE; //Erase
      else gGameCursor.Tag1 := fCompactToMapElem[aObjIndex];
    end;
  
  