63 void HWNewNet::AddTeam(const HWTeam & team) |
63 void HWNewNet::AddTeam(const HWTeam & team) |
64 { |
64 { |
65 RawSendNet(QString("ADDTEAM:") + delimeter + |
65 RawSendNet(QString("ADDTEAM:") + delimeter + |
66 team.TeamName + delimeter + |
66 team.TeamName + delimeter + |
67 team.teamColor.name() + delimeter + |
67 team.teamColor.name() + delimeter + |
|
68 team.Grave + delimeter + |
|
69 team.Fort + delimeter + |
|
70 QString::number(team.difficulty) + delimeter + |
68 team.HHName[0] + delimeter + team.HHName[1] + delimeter + |
71 team.HHName[0] + delimeter + team.HHName[1] + delimeter + |
69 team.HHName[2] + delimeter + team.HHName[3] + delimeter + team.HHName[4] + delimeter + |
72 team.HHName[2] + delimeter + team.HHName[3] + delimeter + team.HHName[4] + delimeter + |
70 team.HHName[5] + delimeter + team.HHName[6] + delimeter + team.HHName[7]); |
73 team.HHName[5] + delimeter + team.HHName[6] + delimeter + team.HHName[7]); |
71 } |
74 } |
72 |
75 |
277 onTurnTimeChanged(m_pGameCFGWidget->getTurnTime()); |
280 onTurnTimeChanged(m_pGameCFGWidget->getTurnTime()); |
278 } |
281 } |
279 |
282 |
280 void HWNewNet::RunGame() |
283 void HWNewNet::RunGame() |
281 { |
284 { |
282 HWGame* game = new HWGame(config, m_pGameCFGWidget, m_pTeamSelWidget); // FIXME: memory leak here (stackify it?) |
285 HWGame* game = new HWGame(config, m_pGameCFGWidget, m_pTeamSelWidget); |
283 connect(game, SIGNAL(SendNet(const QByteArray &)), this, SLOT(SendNet(const QByteArray &))); |
286 connect(game, SIGNAL(SendNet(const QByteArray &)), this, SLOT(SendNet(const QByteArray &))); |
284 connect(this, SIGNAL(FromNet(const QByteArray &)), game, SLOT(FromNet(const QByteArray &))); |
287 connect(this, SIGNAL(FromNet(const QByteArray &)), game, SLOT(FromNet(const QByteArray &))); |
285 connect(this, SIGNAL(LocalCFG(const QString &)), game, SLOT(LocalCFG(const QString &))); |
288 connect(this, SIGNAL(LocalCFG(const QString &)), game, SLOT(LocalCFG(const QString &))); |
286 connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection); |
289 connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection); |
287 game->StartNet(); |
290 game->StartNet(); |