Fix team colors mismatch on some conditions (just synchronize them when team is added)
authorunc0rr
Thu, 09 Oct 2008 17:14:29 +0000
changeset 1336 4e88eccbe7f6
parent 1335 c795cbc752c1
child 1337 b652c002633b
Fix team colors mismatch on some conditions (just synchronize them when team is added)
QTfrontend/newnetclient.cpp
netserver/HWProto.hs
--- a/QTfrontend/newnetclient.cpp	Thu Oct 09 16:05:01 2008 +0000
+++ b/QTfrontend/newnetclient.cpp	Thu Oct 09 17:14:29 2008 +0000
@@ -66,6 +66,8 @@
 	}
 	
 	RawSendNet(QString("CREATE%1%2").arg(delimeter).arg(room));
+	m_pGameCFGWidget->setEnabled(true);
+	//m_pTeamSelWidget->setNonInteractive();
 	isChief = true;
 }
 
--- a/netserver/HWProto.hs	Thu Oct 09 16:05:01 2008 +0000
+++ b/netserver/HWProto.hs	Thu Oct 09 17:14:29 2008 +0000
@@ -159,7 +159,7 @@
 	if length (teams clRoom) == 6 || canAddNumber <= 0 || isJust findTeam then
 		(noChangeClients, noChangeRooms, answerCantAdd)
 	else
-		(noChangeClients, modifyRoom clRoom{teams = teams clRoom ++ [newTeam]}, answerTeamAccepted newTeam ++ answerAddTeam newTeam)
+		(noChangeClients, modifyRoom clRoom{teams = teams clRoom ++ [newTeam]}, answerTeamAccepted newTeam ++ answerAddTeam newTeam ++ answerTeamColor name color)
 	where
 		clRoom = roomByName (room client) rooms
 		newTeam = (TeamInfo (nick client) name color grave fort difficulty newTeamHHNum (hhsList hhsInfo))