anchor.diff:      procedure SetAllowAllyToSelect(aAllow: Boolean); virtual;
     public
       constructor Create(aType: TKMHandEntityType; aUID: Integer; aOwner: TKMHandID);
  -    constructor Load(LoadStream: TKMemoryStream); virtual;
  -    procedure Save(SaveStream: TKMemoryStream); virtual;
  +    constructor Load(LoadStream: TKMemoryStream); override;
  +    procedure Save(SaveStream: TKMemoryStream); override;
   
       property EntityType: TKMHandEntityType read GetType;
       property Owner: TKMHandID read GetOwner write SetOwner;
   
  -    property UID: Integer read GetUID;
       property Position: TKMPoint read GetPosition;
       property PositionF: TKMPointF read GetPositionF write SetPositionF;
   
  
positive.code: 
  procedure TKMHandEntity.Save(SaveStream: TKMemoryStream);
  begin
    SaveStream.PlaceMarker('Entity');
    SaveStream.Write(fUID);
    SaveStream.Write(fType, SizeOf(fType));
    SaveStream.Write(fOwner, SizeOf(fOwner));
    SaveStream.Write(fAllowAllyToSelect);
  
negative.code:   KM_CommonExceptions;
  
  
  constructor TKMEntity.Create(aUID: Integer);
  begin
    inherited Create;
  
    fUID := aUID;
  end;
  
  
  constructor TKMEntity.Load(LoadStream: TKMemoryStream);
  begin
    inherited Create;
  
    LoadStream.CheckMarker('Entity');
    LoadStream.Read(fUID);
  end;
  
  
  procedure TKMEntity.Save(SaveStream: TKMemoryStream);
  begin
    SaveStream.PlaceMarker('Entity');
    SaveStream.Write(fUID);
  end;
  
  
  procedure TKMEntity.SetUID(aUID: Integer);
  begin
    fUID := aUID;
  end;
  
  
  function TKMEntity.GetUID: Integer;
  begin
    if Self = nil then Exit(NO_ENTITY_UID); // Exit with 0, if object is not set. Good UID is always > 0
  
    Result := fUID;
  end;
  
  
  { TKMHandEntity }
  constructor TKMHandEntity.Create(aType: TKMHandEntityType; aUID: Integer; aOwner: TKMHandID);
  begin
    inherited Create(aUID);
  
    fType := aType;
    fOwner := aOwner;
    fAllowAllyToSelect := False; // Entity view for allies is blocked by default
  end;
  