# HG changeset patch # User displacer # Date 1162048191 0 # Node ID c5480c5b11ff159525c5334f7873e24e43f94420 # Parent c8c650b23e32df07e8e3c82e2e9c134a208a4419 multiplayer colors enabled diff -r c8c650b23e32 -r c5480c5b11ff QTfrontend/game.cpp --- a/QTfrontend/game.cpp Sat Oct 28 13:18:23 2006 +0000 +++ b/QTfrontend/game.cpp Sat Oct 28 15:09:51 2006 +0000 @@ -61,8 +61,9 @@ { SendIPC("eaddteam"); LocalCFG(teams[i]); - SendIPC(QString("ecolor %1").arg(65535 << i * 8).toAscii()); - for (int t = 0; t < hdNum[teams[i]]; t++) + QColor clr=m_teamsParams[teams[i]].teamColor; + SendIPC(QString("ecolor %1").arg(clr.rgb()).toAscii());//&0xFFFFFF + for (int t = 0; t < m_teamsParams[teams[i]].numHedgehogs; t++) SendIPC(QString("eadd hh%1 0").arg(t).toAscii()); } } @@ -189,12 +190,12 @@ return arguments; } -void HWGame::AddTeam(const QString & teamname, unsigned char numHedgedogs) +void HWGame::AddTeam(const QString & teamname, HWTeamTempParams teamParams) { if (TeamCount == 5) return; teams[TeamCount] = teamname; TeamCount++; - hdNum[teamname]=numHedgedogs; + m_teamsParams[teamname]=teamParams; } void HWGame::SaveDemo(const QString & filename) diff -r c8c650b23e32 -r c5480c5b11ff QTfrontend/game.h --- a/QTfrontend/game.h Sat Oct 28 13:18:23 2006 +0000 +++ b/QTfrontend/game.h Sat Oct 28 15:09:51 2006 +0000 @@ -36,7 +36,7 @@ Q_OBJECT public: HWGame(GameUIConfig * config, GameCFGWidget * gamecfg); - void AddTeam(const QString & team, unsigned char numHedgedogs); + void AddTeam(const QString & team, HWTeamTempParams teamParams); void PlayDemo(const QString & demofilename); void StartLocal(); void StartQuick(); @@ -64,7 +64,7 @@ }; char msgbuf[MAXMSGCHARS]; QString teams[5]; - std::map hdNum; + std::map m_teamsParams; QString seed; int TeamCount; GameUIConfig * config; diff -r c8c650b23e32 -r c5480c5b11ff QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Sat Oct 28 13:18:23 2006 +0000 +++ b/QTfrontend/hwform.cpp Sat Oct 28 15:09:51 2006 +0000 @@ -254,7 +254,7 @@ list teamslist=ui.pageMultiplayer->teamsSelect->getPlayingTeams(); for (list::const_iterator it = teamslist.begin(); it != teamslist.end(); ++it ) { HWTeamTempParams params=ui.pageMultiplayer->teamsSelect->getTeamParams(it->TeamName); - game->AddTeam(it->TeamName, params.numHedgehogs); + game->AddTeam(it->TeamName, params); } game->StartLocal(); }