anchor.diff:    UpdatePlayer(playerId);
   
     //There should be exactly one default human player
  -  if Sender = ChkBox_PlayerTypes[playerId, 0] then
  +  if Sender = ChkBox_PlayerTypes[playerId, mptDefault] then
     begin
       gGame.MapEditor.DefaultHuman := playerId;
       gGame.MapEditor.PlayerHuman[playerId] := True;
     end;
   
  -  if Sender = ChkBox_PlayerTypes[playerId, 1] then
  -  begin
  -    gGame.MapEditor.PlayerHuman[playerId] := ChkBox_PlayerTypes[playerId, 1].Checked;
  +  if Sender = ChkBox_PlayerTypes[playerId, mptHuman] then
  +  begin
  +    gGame.MapEditor.PlayerHuman[playerId] := ChkBox_PlayerTypes[playerId, mptHuman].Checked;
       //User cannot set player type undetermined
  -    if not ChkBox_PlayerTypes[playerId, 1].Checked
  -        and not ChkBox_PlayerTypes[playerId, 2].Checked
  -        and not ChkBox_PlayerTypes[playerId, 3].Checked then
  +    if not ChkBox_PlayerTypes[playerId, mptHuman].Checked
  +        and not ChkBox_PlayerTypes[playerId, mptClassicAI].Checked
  +        and not ChkBox_PlayerTypes[playerId, mptAdvancedAI].Checked then
           gGame.MapEditor.PlayerClassicAI[playerId] := True;
     end;
   
  -  if (Sender = ChkBox_PlayerTypes[playerId, 2])
  -    or (Sender = ChkBox_PlayerTypes[playerId, 3]) then
  -  begin
  -    gGame.MapEditor.PlayerClassicAI[playerId] := ChkBox_PlayerTypes[playerId, 2].Checked;
  -    gGame.MapEditor.PlayerAdvancedAI[playerId] := ChkBox_PlayerTypes[playerId, 3].Checked;
  -    if not ChkBox_PlayerTypes[playerId, 1].Checked then
  +  if (Sender = ChkBox_PlayerTypes[playerId, mptClassicAI])
  +    or (Sender = ChkBox_PlayerTypes[playerId, mptAdvancedAI]) then
  +  begin
  +    gGame.MapEditor.PlayerClassicAI[playerId] := ChkBox_PlayerTypes[playerId, mptClassicAI].Checked;
  +    gGame.MapEditor.PlayerAdvancedAI[playerId] := ChkBox_PlayerTypes[playerId, mptAdvancedAI].Checked;
  +    if not ChkBox_PlayerTypes[playerId, mptHuman].Checked then
       begin
         //User cannot set player type undetermined
  -      if not ChkBox_PlayerTypes[playerId, 2].Checked
  -        and not ChkBox_PlayerTypes[playerId, 3].Checked then
  +      if not ChkBox_PlayerTypes[playerId, mptClassicAI].Checked
  +        and not ChkBox_PlayerTypes[playerId, mptAdvancedAI].Checked then
           gGame.MapEditor.PlayerHuman[playerId] := True;
         //Can't be 2 default AI types (without human)
  -//      if CheckBox_PlayerTypes[PlayerId, 2].Checked
  -//        and CheckBox_PlayerTypes[PlayerId, 3].Checked then
  +//      if CheckBox_PlayerTypes[PlayerId, mptClassicAI].Checked
  +//        and CheckBox_PlayerTypes[PlayerId, mptAdvancedAI].Checked then
   //      begin
  -//        if (Sender = CheckBox_PlayerTypes[PlayerId, 2]) then
  +//        if (Sender = CheckBox_PlayerTypes[PlayerId, mptClassicAI]) then
   //          gGame.MapEditor.PlayerAdvancedAI[PlayerId] := False
   //        else
   //          gGame.MapEditor.PlayerClassicAI[PlayerId] := False;
  
positive.code:   ICON_SPACE_W = 25;
    ICON_SPACE_H = 32;
  
    PLAYER_TYPE_TX: array [0..2] of Integer = (TX_PLAYER_HUMAN, TX_AI_PLAYER_CLASSIC, TX_AI_PLAYER_ADVANCED);
  
  { TKMMapEdMissionPlayers }
  constructor TKMMapEdMissionPlayers.Create(aParent: TKMPanel);
  var
    I,K, Top, PanelH: Integer;
  begin
    inherited Create;
  
  
negative.code: 
  procedure TKMMapEdMissionPlayers.Mission_PlayerTypesAllClick(Sender: TObject);
  var
    I: Integer;
    MPT: TKMMapEdPlayerType;
    checked: Boolean;
  begin
    MPT := TKMMapEdPlayerType(TKMCheckBox(Sender).Tag);
  
    for I := 0 to MAX_HANDS - 1 do
    begin
      if not ChkBox_PlayerTypes[I, MPT].IsClickable then
        Continue;
  
      checked := TKMCheckBox(Sender).Checked;
  
      ChkBox_PlayerTypes[I, MPT].SetChecked(checked);
      case MPT of
        mptHuman:       gGame.MapEditor.PlayerHuman[I] := checked;
        mptClassicAI:   gGame.MapEditor.PlayerClassicAI[I] := checked;
        mptAdvancedAI:  gGame.MapEditor.PlayerAdvancedAI[I] := checked;
      end;
    end;
  
  