author | displacer |
Sun, 01 Oct 2006 20:25:03 +0000 | |
changeset 178 | efdc2a63be8e |
parent 177 | c67c15e6fae3 |
child 180 | ea83b9e9057f |
permissions | -rw-r--r-- |
25 | 1 |
/* |
2 |
* Hedgewars, a worms-like game |
|
128 | 3 |
* Copyright (c) 2005, 2006 Andrey Korotaev <unC0Rr@gmail.com> |
25 | 4 |
* |
5 |
* Distributed under the terms of the BSD-modified licence: |
|
6 |
* |
|
7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
|
8 |
* of this software and associated documentation files (the "Software"), to deal |
|
9 |
* with the Software without restriction, including without limitation the |
|
10 |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
|
11 |
* sell copies of the Software, and to permit persons to whom the Software is |
|
12 |
* furnished to do so, subject to the following conditions: |
|
13 |
* |
|
14 |
* 1. Redistributions of source code must retain the above copyright notice, |
|
15 |
* this list of conditions and the following disclaimer. |
|
16 |
* 2. Redistributions in binary form must reproduce the above copyright notice, |
|
17 |
* this list of conditions and the following disclaimer in the documentation |
|
18 |
* and/or other materials provided with the distribution. |
|
19 |
* 3. The name of the author may not be used to endorse or promote products |
|
20 |
* derived from this software without specific prior written permission. |
|
21 |
* |
|
22 |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
|
23 |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
24 |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
|
25 |
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
26 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
27 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
|
28 |
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
|
29 |
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
|
30 |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
|
31 |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
32 |
*/ |
|
33 |
||
34 |
#include <QMessageBox> |
|
35 |
#include <QProcess> |
|
36 |
#include <QTimer> |
|
37 |
#include <QString> |
|
38 |
#include <QByteArray> |
|
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
39 |
#include <QFile> |
25 | 40 |
#include <QTextStream> |
127 | 41 |
#include <QUuid> |
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
42 |
|
25 | 43 |
#include "game.h" |
44 |
#include "hwconsts.h" |
|
85
44d9045b26ff
New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents:
84
diff
changeset
|
45 |
#include "gameuiconfig.h" |
87 | 46 |
#include "gamecfgwidget.h" |
25 | 47 |
|
85
44d9045b26ff
New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents:
84
diff
changeset
|
48 |
HWGame::HWGame(GameUIConfig * config, GameCFGWidget * gamecfg) |
25 | 49 |
{ |
84 | 50 |
this->config = config; |
85
44d9045b26ff
New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents:
84
diff
changeset
|
51 |
this->gamecfg = gamecfg; |
25 | 52 |
TeamCount = 0; |
26 | 53 |
seed = ""; |
25 | 54 |
} |
55 |
||
178
efdc2a63be8e
united TCP transfers for start game and receive preview
displacer
parents:
177
diff
changeset
|
56 |
void HWGame::onClientDisconnect() |
25 | 57 |
{ |
157 | 58 |
SaveDemo(cfgdir->absolutePath() + "/Demos/LastRound.hwd_1"); |
25 | 59 |
} |
60 |
||
61 |
void HWGame::SendTeamConfig(int index) |
|
62 |
{ |
|
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
63 |
LocalCFG(teams[index]); |
25 | 64 |
} |
65 |
||
66 |
void HWGame::SendConfig() |
|
67 |
{ |
|
55
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
52
diff
changeset
|
68 |
SendIPC(QString("eseed %1").arg(seed)); |
127 | 69 |
SendIPC(QString("etheme %1").arg(config->GetRandomTheme())); |
25 | 70 |
SENDIPC("TL"); |
85
44d9045b26ff
New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents:
84
diff
changeset
|
71 |
SendIPC(QString("e$gmflags %1").arg(gamecfg->getGameFlags())); |
141 | 72 |
|
73 |
for (int i = 0; i < TeamCount; i++) |
|
74 |
{ |
|
75 |
SENDIPC("eaddteam"); |
|
76 |
LocalCFG(teams[i]); |
|
77 |
SendIPC(QString("ecolor %1").arg(65535 << i * 8)); |
|
78 |
for (int t = 0; t < hdNum[teams[i]]; t++) |
|
149 | 79 |
SendIPC(QString("eadd hh%1 0").arg(t)); |
141 | 80 |
} |
81 |
} |
|
82 |
||
83 |
void HWGame::SendQuickConfig() |
|
84 |
{ |
|
85 |
SendIPC(QString("eseed %1").arg(seed)); |
|
86 |
SendIPC(QString("etheme %1").arg(config->GetRandomTheme())); |
|
87 |
SENDIPC("TL"); |
|
88 |
SendIPC(QString("e$gmflags %1").arg(gamecfg->getGameFlags())); |
|
25 | 89 |
SENDIPC("eaddteam"); |
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
90 |
LocalCFG(0); |
25 | 91 |
SENDIPC("ecolor 65535"); |
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
92 |
SENDIPC("eadd hh0 0"); |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
93 |
SENDIPC("eadd hh1 0"); |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
94 |
SENDIPC("eadd hh2 0"); |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
95 |
SENDIPC("eadd hh3 0"); |
25 | 96 |
SENDIPC("eaddteam"); |
97
e7c1df9cce2c
- make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents:
87
diff
changeset
|
97 |
LocalCFG(2); |
25 | 98 |
SENDIPC("ecolor 16776960"); |
99 |
SENDIPC("eadd hh0 1"); |
|
100 |
SENDIPC("eadd hh1 1"); |
|
101 |
SENDIPC("eadd hh2 1"); |
|
102 |
SENDIPC("eadd hh3 1"); |
|
103 |
} |
|
104 |
||
43 | 105 |
void HWGame::ParseMessage(const QByteArray & msg) |
25 | 106 |
{ |
141 | 107 |
switch(msg.data()[1]) { |
108 |
case '?': { |
|
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
109 |
if (gameType == gtNet) |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
110 |
emit SendNet(QByteArray("\x01""?")); |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
111 |
else |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
112 |
SENDIPC("!"); |
25 | 113 |
break; |
114 |
} |
|
141 | 115 |
case 'C': { |
116 |
switch (gameType) { |
|
142 | 117 |
case gtLocal: { |
118 |
SendConfig(); |
|
119 |
break; |
|
120 |
} |
|
141 | 121 |
case gtQLocal: { |
142 | 122 |
SendQuickConfig(); |
141 | 123 |
break; |
124 |
} |
|
125 |
case gtDemo: break; |
|
126 |
case gtNet: { |
|
127 |
SENDIPC("TN"); |
|
128 |
emit SendNet(QByteArray("\x01""C")); |
|
129 |
break; |
|
130 |
} |
|
32
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
131 |
} |
25 | 132 |
break; |
133 |
} |
|
141 | 134 |
case 'E': { |
43 | 135 |
QMessageBox::critical(0, |
136 |
"Hedgewars: error message", |
|
137 |
QString().append(msg.mid(2)).left(msg.size() - 6), |
|
138 |
QMessageBox::Ok, |
|
139 |
QMessageBox::NoButton, |
|
140 |
QMessageBox::NoButton); |
|
141 |
return; |
|
142 |
} |
|
141 | 143 |
case '+': { |
36 | 144 |
if (gameType == gtNet) |
145 |
{ |
|
43 | 146 |
emit SendNet(msg); |
36 | 147 |
} |
25 | 148 |
break; |
149 |
} |
|
141 | 150 |
default: { |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
151 |
if (gameType == gtNet) |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
152 |
{ |
43 | 153 |
emit SendNet(msg); |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
154 |
} |
43 | 155 |
demo->append(msg); |
25 | 156 |
} |
157 |
} |
|
158 |
} |
|
159 |
||
160 |
void HWGame::SendIPC(const char * msg, quint8 len) |
|
161 |
{ |
|
32
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
162 |
SendIPC(QByteArray::fromRawData(msg, len)); |
25 | 163 |
} |
164 |
||
55
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
52
diff
changeset
|
165 |
void HWGame::SendIPC(const QString & buf) |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
52
diff
changeset
|
166 |
{ |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
52
diff
changeset
|
167 |
SendIPC(QByteArray().append(buf)); |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
52
diff
changeset
|
168 |
} |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
52
diff
changeset
|
169 |
|
25 | 170 |
void HWGame::SendIPC(const QByteArray & buf) |
171 |
{ |
|
28 | 172 |
if (buf.size() > MAXMSGCHARS) return; |
40 | 173 |
quint8 len = buf.size(); |
174 |
RawSendIPC(QByteArray::fromRawData((char *)&len, 1) + buf); |
|
25 | 175 |
} |
176 |
||
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
177 |
void HWGame::RawSendIPC(const QByteArray & buf) |
26 | 178 |
{ |
32
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
179 |
if (!IPCSocket) |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
180 |
{ |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
181 |
toSendBuf += buf; |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
182 |
} else |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
183 |
{ |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
184 |
if (toSendBuf.size() > 0) |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
185 |
{ |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
186 |
IPCSocket->write(toSendBuf); |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
187 |
demo->append(toSendBuf); |
40 | 188 |
toSendBuf.clear(); |
32
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
189 |
} |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
190 |
IPCSocket->write(buf); |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
191 |
demo->append(buf); |
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
192 |
} |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
193 |
} |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
194 |
|
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
195 |
void HWGame::FromNet(const QByteArray & msg) |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
196 |
{ |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
197 |
RawSendIPC(msg); |
26 | 198 |
} |
199 |
||
177 | 200 |
void HWGame::onClientRead() |
201 |
{ |
|
43 | 202 |
quint8 msglen; |
203 |
quint32 bufsize; |
|
204 |
while (((bufsize = readbuffer.size()) > 0) && |
|
205 |
((msglen = readbuffer.data()[0]) < bufsize)) |
|
25 | 206 |
{ |
43 | 207 |
QByteArray msg = readbuffer.left(msglen + 1); |
208 |
readbuffer.remove(0, msglen + 1); |
|
209 |
ParseMessage(msg); |
|
25 | 210 |
} |
211 |
} |
|
212 |
||
177 | 213 |
QStringList HWGame::setArguments() |
214 |
{ |
|
215 |
QStringList arguments; |
|
84 | 216 |
arguments << resolutions[0][config->vid_Resolution()]; |
217 |
arguments << resolutions[1][config->vid_Resolution()]; |
|
55
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
52
diff
changeset
|
218 |
arguments << "16"; |
25 | 219 |
arguments << "46631"; |
84 | 220 |
arguments << (config->vid_Fullscreen() ? "1" : "0"); |
221 |
arguments << (config->isSoundEnabled() ? "1" : "0"); |
|
80 | 222 |
arguments << tr("en.txt"); |
174 | 223 |
arguments << "128"; |
177 | 224 |
return arguments; |
25 | 225 |
} |
226 |
||
140
50ccde437ea1
teams and hedgedogs num selection added to HWgame
displacer
parents:
128
diff
changeset
|
227 |
void HWGame::AddTeam(const QString & teamname, unsigned char numHedgedogs) |
25 | 228 |
{ |
229 |
if (TeamCount == 5) return; |
|
230 |
teams[TeamCount] = teamname; |
|
231 |
TeamCount++; |
|
140
50ccde437ea1
teams and hedgedogs num selection added to HWgame
displacer
parents:
128
diff
changeset
|
232 |
hdNum[teamname]=numHedgedogs; |
25 | 233 |
} |
234 |
||
235 |
void HWGame::SaveDemo(const QString & filename) |
|
236 |
{ |
|
157 | 237 |
demo->replace(QByteArray("\x02TL"), QByteArray("\x02TD")); |
238 |
demo->replace(QByteArray("\x02TN"), QByteArray("\x02TD")); |
|
239 |
||
25 | 240 |
QFile demofile(filename); |
241 |
if (!demofile.open(QIODevice::WriteOnly)) |
|
242 |
{ |
|
28 | 243 |
QMessageBox::critical(0, |
25 | 244 |
tr("Error"), |
80 | 245 |
tr("Cannot save demo to file %1").arg(filename), |
25 | 246 |
tr("Quit")); |
247 |
return ; |
|
248 |
} |
|
249 |
QDataStream stream(&demofile); |
|
250 |
stream.writeRawData(demo->constData(), demo->size()); |
|
251 |
demofile.close(); |
|
26 | 252 |
delete demo; |
25 | 253 |
} |
26 | 254 |
|
255 |
void HWGame::PlayDemo(const QString & demofilename) |
|
256 |
{ |
|
257 |
gameType = gtDemo; |
|
258 |
QFile demofile(demofilename); |
|
259 |
if (!demofile.open(QIODevice::ReadOnly)) |
|
260 |
{ |
|
28 | 261 |
QMessageBox::critical(0, |
26 | 262 |
tr("Error"), |
80 | 263 |
tr("Cannot open demofile %1").arg(demofilename), |
26 | 264 |
tr("Quit")); |
265 |
return ; |
|
266 |
} |
|
267 |
||
268 |
// read demo |
|
269 |
QDataStream stream(&demofile); |
|
270 |
char buf[512]; |
|
142 | 271 |
int readbytes; |
26 | 272 |
do |
273 |
{ |
|
274 |
readbytes = stream.readRawData((char *)&buf, 512); |
|
32
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
275 |
toSendBuf.append(QByteArray((char *)&buf, readbytes)); |
26 | 276 |
|
277 |
} while (readbytes > 0); |
|
278 |
demofile.close(); |
|
279 |
||
280 |
// run engine |
|
178
efdc2a63be8e
united TCP transfers for start game and receive preview
displacer
parents:
177
diff
changeset
|
281 |
demo = new QByteArray; |
32
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
282 |
Start(); |
26 | 283 |
} |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
284 |
|
97
e7c1df9cce2c
- make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents:
87
diff
changeset
|
285 |
void HWGame::StartNet() |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
286 |
{ |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
287 |
gameType = gtNet; |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
288 |
demo = new QByteArray; |
32
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
289 |
Start(); |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
290 |
} |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
291 |
|
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
292 |
void HWGame::StartLocal() |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
293 |
{ |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
294 |
gameType = gtLocal; |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
295 |
if (TeamCount < 2) return; |
172 | 296 |
seed = gamecfg->getCurrentSeed();//QUuid::createUuid().toString(); |
178
efdc2a63be8e
united TCP transfers for start game and receive preview
displacer
parents:
177
diff
changeset
|
297 |
demo = new QByteArray; |
32
78bff13b11c0
With this patch the game doesn't crash when gaming by net
unc0rr
parents:
31
diff
changeset
|
298 |
Start(); |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
299 |
} |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
300 |
|
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
301 |
void HWGame::StartQuick() |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
302 |
{ |
141 | 303 |
gameType = gtQLocal; |
172 | 304 |
seed = gamecfg->getCurrentSeed();//QUuid::createUuid().toString(); |
178
efdc2a63be8e
united TCP transfers for start game and receive preview
displacer
parents:
177
diff
changeset
|
305 |
demo = new QByteArray; |
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
306 |
Start(); |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
307 |
} |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
308 |
|
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
309 |
|
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
310 |
void HWGame::LocalCFG(const QString & teamname) |
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
311 |
{ |
116 | 312 |
HWTeam team(teamname); |
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
313 |
if (!team.LoadFromFile()) { |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
314 |
QMessageBox::critical(0, |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
315 |
"Error", |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
316 |
QString("Cannot load team config ""%1""").arg(teamname), |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
317 |
QMessageBox::Ok, |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
318 |
QMessageBox::NoButton, |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
319 |
QMessageBox::NoButton); |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
320 |
return; |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
321 |
} |
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
322 |
RawSendIPC(team.IPCTeamInfo()); |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
323 |
} |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
324 |
|
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
325 |
void HWGame::LocalCFG(quint8 num) |
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
326 |
{ |
116 | 327 |
HWTeam team(num); |
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
85
diff
changeset
|
328 |
RawSendIPC(team.IPCTeamInfo()); |
31
99888245a4e8
Now net game is near available, but exception occurs...
unc0rr
parents:
28
diff
changeset
|
329 |
} |