83 QList<HWTeam> teams = m_pTeamSelWidget->getPlayingTeams(); |
83 QList<HWTeam> teams = m_pTeamSelWidget->getPlayingTeams(); |
84 for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it) |
84 for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it) |
85 { |
85 { |
86 HWProto::addStringListToBuffer(buf, |
86 HWProto::addStringListToBuffer(buf, |
87 (*it).TeamGameConfig(gamecfg->getInitHealth())); |
87 (*it).TeamGameConfig(gamecfg->getInitHealth())); |
|
88 HWProto::addStringToBuffer(buf, *cDefaultAmmoStore); |
88 } |
89 } |
89 } |
90 } |
90 RawSendIPC(buf); |
91 RawSendIPC(buf); |
91 } |
92 } |
92 |
93 |
109 |
110 |
110 HWTeam team2(2); |
111 HWTeam team2(2); |
111 team2.difficulty = 4; |
112 team2.difficulty = 4; |
112 team2.teamColor = QColor(16776960); |
113 team2.teamColor = QColor(16776960); |
113 team2.numHedgehogs = 4; |
114 team2.numHedgehogs = 4; |
114 RawSendIPC(HWProto::addStringListToBuffer(teamscfg, |
115 HWProto::addStringListToBuffer(teamscfg, |
115 team2.TeamGameConfig(gamecfg->getInitHealth()))); |
116 team2.TeamGameConfig(gamecfg->getInitHealth())); |
|
117 |
|
118 HWProto::addStringToBuffer(teamscfg, *cDefaultAmmoStore); |
|
119 HWProto::addStringToBuffer(teamscfg, *cDefaultAmmoStore); |
|
120 RawSendIPC(teamscfg); |
116 } |
121 } |
117 |
122 |
118 void HWGame::SendTrainingConfig() |
123 void HWGame::SendTrainingConfig() |
119 { |
124 { |
120 QByteArray teamscfg; |
125 QByteArray teamscfg; |
121 HWProto::addStringToBuffer(teamscfg, "TL"); |
126 HWProto::addStringToBuffer(teamscfg, "TL"); |
122 HWProto::addStringToBuffer(teamscfg, "eseed none"); |
|
123 HWProto::addStringToBuffer(teamscfg, QString("e$gmflags %1").arg(0x10000000)); |
|
124 HWProto::addStringToBuffer(teamscfg, "e$turntime 60000"); |
|
125 HWProto::addStringToBuffer(teamscfg, "emap mushrooms"); |
|
126 HWProto::addStringToBuffer(teamscfg, "etheme avematan"); |
|
127 |
127 |
128 HWTeam team1(0); |
128 HWTeam team1(0); |
129 team1.difficulty = 0; |
129 team1.difficulty = 0; |
130 team1.teamColor = QColor(65535); |
130 team1.teamColor = QColor(65535); |
131 team1.numHedgehogs = 1; |
131 team1.numHedgehogs = 1; |