equal
deleted
inserted
replaced
182 m_pGameCFGWidget->setEnabled(false); |
182 m_pGameCFGWidget->setEnabled(false); |
183 m_pTeamSelWidget->setNonInteractive(); |
183 m_pTeamSelWidget->setNonInteractive(); |
184 return; |
184 return; |
185 } |
185 } |
186 |
186 |
|
187 if(lst[0]=="JOINED") { |
|
188 if(lst.size()<2) return; |
|
189 qDebug() << "JOINED" << lst[1]; |
|
190 return; |
|
191 } |
|
192 |
187 if (lst[0] == "CONFIGASKED") { |
193 if (lst[0] == "CONFIGASKED") { |
188 isChief=true; |
194 isChief=true; |
189 ConfigAsked(); |
195 ConfigAsked(); |
190 return; |
196 return; |
191 } |
197 } |
249 tmptm.teamColor=QColor(lst[2]); |
255 tmptm.teamColor=QColor(lst[2]); |
250 emit teamColorChanged(tmptm); |
256 emit teamColorChanged(tmptm); |
251 return; |
257 return; |
252 } |
258 } |
253 if (hhTmpList[0] == "HHNUM") { |
259 if (hhTmpList[0] == "HHNUM") { |
254 qDebug() << "NEW HHNUM!"; |
|
255 HWTeam tmptm(hhTmpList[1], hhTmpList[2].toUInt()); |
260 HWTeam tmptm(hhTmpList[1], hhTmpList[2].toUInt()); |
256 if(m_networkToLocalteams.find(hhTmpList[2].toUInt())!=m_networkToLocalteams.end()) { |
261 if(m_networkToLocalteams.find(hhTmpList[2].toUInt())!=m_networkToLocalteams.end()) { |
257 tmptm=HWTeam(hhTmpList[1]); // local team should be changed |
262 tmptm=HWTeam(hhTmpList[1]); // local team should be changed |
258 } |
263 } |
259 tmptm.numHedgehogs=lst[2].toUInt(); |
264 tmptm.numHedgehogs=lst[2].toUInt(); |
306 msg); |
311 msg); |
307 } |
312 } |
308 |
313 |
309 void HWNewNet::onHedgehogsNumChanged(const HWTeam& team) |
314 void HWNewNet::onHedgehogsNumChanged(const HWTeam& team) |
310 { |
315 { |
311 qDebug() << team.getNetID() << ":" << team.numHedgehogs; |
316 RawSendNet(QString("HHNUM%1%2%1%3%1%4").arg(delimeter).arg(team.TeamName)\ |
312 RawSendNet(QString("CONFIG_PARAM%1HHNUM+%2+%3%1%4").arg(delimeter).arg(team.TeamName)\ |
|
313 .arg(team.getNetID() ? team.getNetID() : m_networkToLocalteams.key(team.TeamName))\ |
317 .arg(team.getNetID() ? team.getNetID() : m_networkToLocalteams.key(team.TeamName))\ |
314 .arg(team.numHedgehogs)); |
318 .arg(team.numHedgehogs)); |
315 } |
319 } |
316 |
320 |
317 void HWNewNet::onTeamColorChanged(const HWTeam& team) |
321 void HWNewNet::onTeamColorChanged(const HWTeam& team) |