QTfrontend/game.cpp
changeset 7411 efc75c2d3be9
parent 7258 722e8a0d89dc
parent 7207 b216efbc00ff
child 7628 bc7b1d228a2c
equal deleted inserted replaced
7409:fd91aa100ce0 7411:efc75c2d3be9
    19 #include <QString>
    19 #include <QString>
    20 #include <QByteArray>
    20 #include <QByteArray>
    21 #include <QUuid>
    21 #include <QUuid>
    22 #include <QColor>
    22 #include <QColor>
    23 #include <QStringListModel>
    23 #include <QStringListModel>
    24 #include <QTextStream>
       
    25 
    24 
    26 #include "game.h"
    25 #include "game.h"
    27 #include "hwconsts.h"
    26 #include "hwconsts.h"
    28 #include "gameuiconfig.h"
    27 #include "gameuiconfig.h"
    29 #include "gamecfgwidget.h"
    28 #include "gamecfgwidget.h"
    30 #include "teamselect.h"
    29 #include "teamselect.h"
    31 #include "KB.h"
    30 #include "KB.h"
    32 #include "proto.h"
    31 #include "proto.h"
    33 #include "ThemeModel.h"
    32 
       
    33 #include <QTextStream>
    34 
    34 
    35 QString training, campaign; // TODO: Cleaner solution?
    35 QString training, campaign; // TODO: Cleaner solution?
    36 
    36 
    37 HWGame::HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget) :
    37 HWGame::HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget) :
    38     TCPBase(true),
    38     TCPBase(true),
    96         {
    96         {
    97             HWProto::addStringToBuffer(buf, QString("eammloadt %1").arg(ammostr.mid(0, cAmmoNumber)));
    97             HWProto::addStringToBuffer(buf, QString("eammloadt %1").arg(ammostr.mid(0, cAmmoNumber)));
    98             HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber)));
    98             HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber)));
    99             HWProto::addStringToBuffer(buf, QString("eammdelay %1").arg(ammostr.mid(2 * cAmmoNumber, cAmmoNumber)));
    99             HWProto::addStringToBuffer(buf, QString("eammdelay %1").arg(ammostr.mid(2 * cAmmoNumber, cAmmoNumber)));
   100             HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber)));
   100             HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber)));
   101             if(gamecfg->schemeData(15).toBool() || !gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore"));
   101             if(!gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore"));
   102             HWProto::addStringListToBuffer(buf,
   102             HWProto::addStringListToBuffer(buf,
   103                                            team.teamGameConfig(gamecfg->getInitHealth()));
   103                                            team.teamGameConfig(gamecfg->getInitHealth()));
   104             ;
   104             ;
   105         }
   105         }
   106     }
   106     }