equal
deleted
inserted
replaced
63 catch(const MapFileErrorException& e) { |
63 catch(const MapFileErrorException& e) { |
64 SendIPC(QString("etheme %1").arg(config->GetRandomTheme()).toAscii()); |
64 SendIPC(QString("etheme %1").arg(config->GetRandomTheme()).toAscii()); |
65 } |
65 } |
66 SendIPC("TL"); |
66 SendIPC("TL"); |
67 SendIPC(QString("e$gmflags %1").arg(gamecfg->getGameFlags()).toAscii()); |
67 SendIPC(QString("e$gmflags %1").arg(gamecfg->getGameFlags()).toAscii()); |
|
68 SendIPC(QString("e$turntime %1").arg(gamecfg->getTurnTime() * 1000).toAscii()); |
68 } |
69 } |
69 |
70 |
70 void HWGame::SendConfig() |
71 void HWGame::SendConfig() |
71 { |
72 { |
72 commonConfig(); |
73 commonConfig(); |
76 HWTeam team(teams[i]); |
77 HWTeam team(teams[i]); |
77 team.LoadFromFile(); |
78 team.LoadFromFile(); |
78 |
79 |
79 QColor clr = m_teamsParams[teams[i]].teamColor; |
80 QColor clr = m_teamsParams[teams[i]].teamColor; |
80 QByteArray buf; |
81 QByteArray buf; |
81 QStringList sl = team.TeamGameConfig(clr.rgb()&0xFFFFFF, m_teamsParams[teams[i]].numHedgehogs); |
82 QStringList sl = team.TeamGameConfig(clr.rgb()&0xFFFFFF, |
|
83 m_teamsParams[teams[i]].numHedgehogs, |
|
84 gamecfg->getInitHealth()); |
82 HWProto::addStringListToBuffer(buf, sl); |
85 HWProto::addStringListToBuffer(buf, sl); |
83 RawSendIPC(buf); |
86 RawSendIPC(buf); |
84 } |
87 } |
85 } |
88 } |
86 |
89 |
89 commonConfig(); |
92 commonConfig(); |
90 |
93 |
91 QByteArray teamscfg; |
94 QByteArray teamscfg; |
92 HWTeam team1(0); |
95 HWTeam team1(0); |
93 team1.difficulty = 0; |
96 team1.difficulty = 0; |
94 HWProto::addStringListToBuffer(teamscfg, team1.TeamGameConfig(65535, 4)); |
97 HWProto::addStringListToBuffer(teamscfg, |
|
98 team1.TeamGameConfig(65535, 4, gamecfg->getInitHealth())); |
95 |
99 |
96 HWTeam team2(2); |
100 HWTeam team2(2); |
97 team2.difficulty = 4; |
101 team2.difficulty = 4; |
98 RawSendIPC(HWProto::addStringListToBuffer(teamscfg, team2.TeamGameConfig(16776960, 4))); |
102 RawSendIPC(HWProto::addStringListToBuffer(teamscfg, |
|
103 team2.TeamGameConfig(16776960, 4, gamecfg->getInitHealth()))); |
99 } |
104 } |
100 |
105 |
101 void HWGame::ParseMessage(const QByteArray & msg) |
106 void HWGame::ParseMessage(const QByteArray & msg) |
102 { |
107 { |
103 switch(msg.at(1)) { |
108 switch(msg.at(1)) { |
296 void HWGame::LocalCFG(const QString & teamname) |
301 void HWGame::LocalCFG(const QString & teamname) |
297 { |
302 { |
298 QByteArray teamcfg; |
303 QByteArray teamcfg; |
299 HWTeam team(teamname); |
304 HWTeam team(teamname); |
300 team.LoadFromFile(); |
305 team.LoadFromFile(); |
301 RawSendIPC(HWProto::addStringListToBuffer(teamcfg, team.TeamGameConfig(16776960, 4))); |
306 RawSendIPC(HWProto::addStringListToBuffer(teamcfg, |
302 } |
307 team.TeamGameConfig(16776960, 4, gamecfg->getInitHealth()))); |
303 |
308 } |
|
309 |