Now spectating works for those who joined after game start
authorunc0rr
Fri, 02 Jan 2009 14:10:23 +0000
changeset 1559 71e1f67dcfe7
parent 1558 3370b7ffeb5c
child 1560 e140bc57ff68
Now spectating works for those who joined after game start
QTfrontend/newnetclient.cpp
netserver/HWProto.hs
--- a/QTfrontend/newnetclient.cpp	Fri Jan 02 13:00:46 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Fri Jan 02 14:10:23 2009 +0000
@@ -450,7 +450,7 @@
 		}
 		for(int i = 1; i < lst.size(); ++i)
 		{
-			QByteArray em = QByteArray::fromBase64(lst[1].toAscii());
+			QByteArray em = QByteArray::fromBase64(lst[i].toAscii());
 			emit FromNet(em);
 		}
 		return;
--- a/netserver/HWProto.hs	Fri Jan 02 13:00:46 2009 +0000
+++ b/netserver/HWProto.hs	Fri Jan 02 14:10:23 2009 +0000
@@ -201,7 +201,7 @@
 		watchRound = if (roomProto clRoom < 20) || (not $ gameinprogress clRoom) then
 					[]
 				else
-					answerRunGame ++ answerClientOnly ("GAMEMSG" : roundMsgs clRoom)
+					(answerClientOnly  ["RUN_GAME"]) ++ answerClientOnly ("GAMEMSG" : roundMsgs clRoom)
 
 handleCmd_noRoom client clients rooms ["JOIN", roomName] =
 	handleCmd_noRoom client clients rooms ["JOIN", roomName, ""]