[prev in list] [next in list] [prev in thread] [next in thread] 

List:       atlantik-devel
Subject:    [atlantik-cvs] CVS: kdegames/atlantik/libatlantikclient
From:       kde () office ! kde ! org
Date:       2004-05-28 20:30:02
Message-ID: 40B7A14A.mailCMH1N3CQ2 () office ! kde ! org
[Download RAW message or body]

Update of /home/kde/kdegames/atlantik/libatlantikclient
In directory office:/tmp/cvs-serv16304/libatlantikclient

Modified Files:
	atlantik_network.cpp 
Log Message:
actual fix against crashes on dev server

Index: atlantik_network.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikclient/atlantik_network.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- atlantik_network.cpp	21 May 2004 00:54:48 -0000	1.99
+++ atlantik_network.cpp	28 May 2004 20:30:00 -0000	1.100
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2003 Rob Kaper <cap@capsi.com>
+// Copyright (c) 2002-2004 Rob Kaper <cap@capsi.com>
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -368,8 +368,9 @@
 				{
 					gameId = a.value().toInt();
 
-					if ( m_atlanticCore->playerSelf() && m_atlanticCore->playerSelf()->game() )
-						kdDebug() << "gameupdate for " << QString::number(gameId) << " with playerSelf \
in game " << QString::number(m_atlanticCore->playerSelf()->game()->id()) << endl; \
+					Player *playerSelf = m_atlanticCore->playerSelf(); +					if ( playerSelf && \
playerSelf->game() ) +						kdDebug() << "gameupdate for " << QString::number(gameId) \
<< " with playerSelf in game " << QString::number(playerSelf->game()->id()) << endl;  \
else  kdDebug() << "gameupdate for " << QString::number(gameId) << endl;
 
@@ -411,14 +412,17 @@
 					}
 
 					QString status = e.attributeNode(QString("status")).value();
-					if (status == "config")
-						emit gameConfig();
-					else if (status == "init")
-						emit gameInit();
-					else if (status == "run")
-						emit gameRun();
-					else if (status == "end")
-						emit gameEnd();
+					if ( playerSelf && playerSelf->game() == game )
+					{
+						if (status == "config")
+							emit gameConfig();
+						else if (status == "init")
+							emit gameInit();
+						else if (status == "run")
+							emit gameRun();
+						else if (status == "end")
+							emit gameEnd();
+					}
 
 					if (game)
 						game->update();

_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@kde.org
https://mail.kde.org/mailman/listinfo/atlantik-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic