anchor.diff:  end;
   
   
  -{ Should update any items changed by game (resource counts, hp, etc..) }
  -{ If it ever gets a bottleneck then some static Controls may be excluded from update }
  -procedure TKMGamePlayInterface.UpdateState(aTickCount: Cardinal);
  -var
  -  I: Integer;
  -  Rect: TKMRect;
  -begin
  -  // Update minimap every 1000ms
  -  if aTickCount mod 10 = 0 then
  -    fMinimap.Update(False);
  -
  -  fAlerts.UpdateState(aTickCount);
  -
  +procedure TKMGamePlayInterface.UpdateSelectedObject;
  +begin
     // Update unit/house information
     if gMySpectator.Selected is TKMUnitGroup then
       ShowGroupInfo(TKMUnitGroup(gMySpectator.Selected))
  
positive.code: 
    if (gMySpectator.Selected <> nil)
      and (OldHandIndex <> gMySpectator.HandIndex) then
      gMySpectator.Selected := nil;   // Reset selection when start viewing another player
  
    if Checkbox_ReplayFOW.Checked then
      gMySpectator.FOWIndex := gMySpectator.HandIndex
  
negative.code:     Exit;
  
    if gMySpectator.Selected is TKMUnit then
    begin
  
      NextUnit := gHands.GetNextUnitWSameType(TKMUnit(gMySpectator.Selected));
      if NextUnit <> nil then
      begin
        gMySpectator.Selected := NextUnit;
        if (fUIMode in [umSP, umMP]) and not HasLostMPGame then
          gSoundPlayer.PlayCitizen(NextUnit.UnitType, sp_Select); // play unit selection sound
        fViewport.Position := NextUnit.PositionF; //center viewport on that unit
      end;
  
    end else if gMySpectator.Selected is TKMHouse then
    begin
  
      NextHouse := gHands.GetNextHouseWSameType(TKMHouse(gMySpectator.Selected));
      if NextHouse <> nil then
      begin
        gMySpectator.Selected := NextHouse;
        fViewport.Position := KMPointF(NextHouse.Entrance); //center viewport on that house
      end;
  
    end else if gMySpectator.Selected is TKMUnitGroup then
    begin
  
      NextUnitGroup := gHands.GetNextGroupWSameType(TKMUnitGroup(gMySpectator.Selected));
      if NextUnitGroup <> nil then
      begin
        gMySpectator.Selected := NextUnitGroup;
        NextUnitGroup.SelectFlagBearer;
        if (fUIMode in [umSP, umMP]) and not HasLostMPGame then
          gSoundPlayer.PlayWarrior(NextUnitGroup.SelectedUnit.UnitType, sp_Select); // play unit group selection sound
        fViewport.Position := NextUnitGroup.SelectedUnit.PositionF; //center viewport on that unit
      end;
  
    end;
  
    UpdateSelectedObject;
  end;
  
  
  