QTfrontend/game.cpp
changeset 5772 c09c50efe8b5
parent 5289 9d18b61bd3eb
child 5781 1fa54e5ea479
equal deleted inserted replaced
5771:e3a047e84e19 5772:c09c50efe8b5
    82 
    82 
    83     buf += gamecfg->getFullConfig();
    83     buf += gamecfg->getFullConfig();
    84 
    84 
    85     if (m_pTeamSelWidget)
    85     if (m_pTeamSelWidget)
    86     {
    86     {
    87         QListIterator<HWTeam> it(m_pTeamSelWidget->getPlayingTeams());
    87         foreach(HWTeam team, m_pTeamSelWidget->getPlayingTeams())
    88         while(it.hasNext())
       
    89         {
    88         {
    90             HWProto::addStringToBuffer(buf, QString("eammloadt %1").arg(ammostr.mid(0, cAmmoNumber)));
    89             HWProto::addStringToBuffer(buf, QString("eammloadt %1").arg(ammostr.mid(0, cAmmoNumber)));
    91             HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber)));
    90             HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber)));
    92             HWProto::addStringToBuffer(buf, QString("eammdelay %1").arg(ammostr.mid(2 * cAmmoNumber, cAmmoNumber)));
    91             HWProto::addStringToBuffer(buf, QString("eammdelay %1").arg(ammostr.mid(2 * cAmmoNumber, cAmmoNumber)));
    93             HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber)));
    92             HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber)));
    94             if(!gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore"));
    93             if(!gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore"));
    95             HWProto::addStringListToBuffer(buf,
    94             HWProto::addStringListToBuffer(buf,
    96                 it.next().TeamGameConfig(gamecfg->getInitHealth()));
    95                 team.TeamGameConfig(gamecfg->getInitHealth()));
    97             ;
    96             ;
    98         }
    97         }
    99     }
    98     }
   100     RawSendIPC(buf);
    99     RawSendIPC(buf);
   101 }
   100 }
   390 void HWGame::KillAllTeams()
   389 void HWGame::KillAllTeams()
   391 {
   390 {
   392     if (m_pTeamSelWidget)
   391     if (m_pTeamSelWidget)
   393     {
   392     {
   394         QByteArray buf;
   393         QByteArray buf;
   395         QListIterator<HWTeam> it(m_pTeamSelWidget->getPlayingTeams());
   394         foreach(HWTeam team, m_pTeamSelWidget->getPlayingTeams())
   396         while(it.hasNext())
   395             HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(team.TeamName));
   397             HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(it.next().TeamName));
       
   398         RawSendIPC(buf);
   396         RawSendIPC(buf);
   399     }
   397     }
   400 }
   398 }