QTfrontend/team.cpp
changeset 7131 c0c787eb526e
parent 7130 fcab1fd02bc6
child 7133 9f250f79cb79
equal deleted inserted replaced
7130:fcab1fd02bc6 7131:c0c787eb526e
    35 {
    35 {
    36     m_name = teamname;
    36     m_name = teamname;
    37     OldTeamName = m_name;
    37     OldTeamName = m_name;
    38     for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
    38     for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
    39     {
    39     {
       
    40         m_hedgehogs.append(HWHog());
    40         m_hedgehogs[i].Name = (QLineEdit::tr("hedgehog %1").arg(i+1));
    41         m_hedgehogs[i].Name = (QLineEdit::tr("hedgehog %1").arg(i+1));
    41         m_hedgehogs[i].Hat = "NoHat";
    42         m_hedgehogs[i].Hat = "NoHat";
    42     }
    43     }
    43     m_grave = "Statue";
    44     m_grave = "Statue";
    44     m_fort = "Plane";
    45     m_fort = "Plane";
    45     m_voicepack = "Default";
    46     m_voicepack = "Default";
    46     m_flag = "hedgewars";
    47     m_flag = "hedgewars";
    47     for(int i = 0; i < BINDS_NUMBER; i++)
    48     for(int i = 0; i < BINDS_NUMBER; i++)
    48     {
    49     {
       
    50         m_binds.append(BindAction());
    49         m_binds[i].action = cbinds[i].action;
    51         m_binds[i].action = cbinds[i].action;
    50         m_binds[i].strbind = cbinds[i].strbind;
    52         m_binds[i].strbind = cbinds[i].strbind;
    51     }
    53     }
    52     m_rounds = 0;
    54     m_rounds = 0;
    53     m_wins = 0;
    55     m_wins = 0;
    68     m_flag = strLst[4];
    70     m_flag = strLst[4];
    69     m_owner = strLst[5];
    71     m_owner = strLst[5];
    70     m_difficulty = strLst[6].toUInt();
    72     m_difficulty = strLst[6].toUInt();
    71     for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
    73     for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
    72     {
    74     {
       
    75         m_hedgehogs.append(HWHog());
    73         m_hedgehogs[i].Name=strLst[i * 2 + 7];
    76         m_hedgehogs[i].Name=strLst[i * 2 + 7];
    74         m_hedgehogs[i].Hat=strLst[i * 2 + 8];
    77         m_hedgehogs[i].Hat=strLst[i * 2 + 8];
    75 // Somehow claymore managed an empty hat.  Until we figure out how, this should avoid a repeat
    78 // Somehow claymore managed an empty hat.  Until we figure out how, this should avoid a repeat
    76 // Checking net teams is probably pointless, but can't hurt.
    79 // Checking net teams is probably pointless, but can't hurt.
    77         if (m_hedgehogs[i].Hat.isEmpty()) m_hedgehogs[i].Hat = "NoHat";
    80         if (m_hedgehogs[i].Hat.isEmpty()) m_hedgehogs[i].Hat = "NoHat";
    88     , m_isNetTeam(false)
    91     , m_isNetTeam(false)
    89 {
    92 {
    90     m_name = QString("Team");
    93     m_name = QString("Team");
    91     for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
    94     for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
    92     {
    95     {
       
    96         m_hedgehogs.append(HWHog());
    93         m_hedgehogs[i].Name.sprintf("hedgehog %d", i);
    97         m_hedgehogs[i].Name.sprintf("hedgehog %d", i);
    94         m_hedgehogs[i].Hat = "NoHat";
    98         m_hedgehogs[i].Hat = "NoHat";
    95     }
    99     }
    96 
   100 
    97     m_grave = QString("Simple"); // default
   101     m_grave = QString("Simple"); // default
    99     m_voicepack = "Default";
   103     m_voicepack = "Default";
   100     m_flag = "hedgewars";
   104     m_flag = "hedgewars";
   101 
   105 
   102     for(int i = 0; i < BINDS_NUMBER; i++)
   106     for(int i = 0; i < BINDS_NUMBER; i++)
   103     {
   107     {
       
   108         m_binds.append(BindAction());
   104         m_binds[i].action = cbinds[i].action;
   109         m_binds[i].action = cbinds[i].action;
   105         m_binds[i].strbind = cbinds[i].strbind;
   110         m_binds[i].strbind = cbinds[i].strbind;
   106     }
   111     }
   107     m_rounds = 0;
   112     m_rounds = 0;
   108     m_wins = 0;
   113     m_wins = 0;