[atlantik-cvs] CVS: kdegames/atlantik/libatlantikui board.cpp,1.105,1.106

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv8347

Modified Files:
	board.cpp 
Log Message:
fix #54466

Index: board.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/board.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- board.cpp	8 Feb 2003 14:44:40 -0000	1.105
+++ board.cpp	12 Feb 2003 03:05:29 -0000	1.106
@@ -202,10 +202,12 @@
 
 void AtlantikBoard::playerChanged(Player *player)
 {
+	kdDebug() << "playerChanged: playerLoc " << (player->location() ? player->location()->name() : "none") << endl;
 	// Update token
 	Token *token = findToken(player);
 	if (token)
 	{
+		kdDebug() << "playerChanged: tokenLoc " << (token->location() ? token->location()->name() : "none") << endl;
 		if (player->hasTurn())
 			token->raise();
 
@@ -255,6 +257,13 @@
 
 	QPoint tGeom = calculateTokenDestination(token);
 	token->setGeometry(tGeom.x(), tGeom.y(), token->width(), token->height());
+
+	if (Player *player = token->player())
+	{
+		player->setLocation(token->location());
+		player->setDestination(0);
+	}
+
 	if (token->isHidden())
 		token->show();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.