anchor.diff:    //Make sure we are a commander and have a crew //Don't allow to split in following cases
     if (fCommander <> nil) or (fMembers = nil) or (fMembers.Count = 0) then exit;
   
  -  NewCommander := nil; //init
  -
     //If there are different unit types in the group, split should just split them first
     MultipleTypes := false;
  +  NewCommander  := nil; //init
     for i := 0 to fMembers.Count-1 do
       if TKMUnitWarrior(fMembers.Items[i]).GetUnitType <> fUnitType then
       begin
  
positive.code:     else
        fThought:=th_None;
  
    //Tell the player to feed us if we are hungry and a commander
    //todo: This shouldn't run every tick
    if (fOwner = MyPlayer.PlayerID) and (fCommander = nil) then
    begin
      SomeoneHungry := (fCondition < UNIT_MIN_CONDITION);
      if (fMembers <> nil) and (not SomeoneHungry) then
        for i:=0 to fMembers.Count-1 do
        begin
  
negative.code:     if (MultipleTypes and(TKMUnitWarrior(fMembers.Items[i-DeletedCount]).GetUnitType <> fUnitType)) or
        ((not MultipleTypes)and(i-DeletedCount >= fMembers.Count div 2)) then
      begin
        NewCommander.AddMember(fMembers.Items[i-DeletedCount]); //Join new commander
        TKMUnitWarrior(fMembers.Items[i-DeletedCount]).fCommander := NewCommander;
        fMembers.Delete(i-DeletedCount); //Leave this commander
        inc(DeletedCount);
      end; //Else stay with this commander
    end;
    //Make sure units per row is still valid
    fUnitsPerRow := min(fUnitsPerRow, fMembers.Count+1);
    NewCommander.fUnitsPerRow := min(fUnitsPerRow, NewCommander.fMembers.Count+1);
    //Tell both commanders to reposition
    Halt;
    NewCommander.Halt;
  end;
  
  
  