[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-games-devel
Subject: Re: [Kde-games-devel] Why a KPlayer is not added ?
From: Kleag <kleag () free ! fr>
Date: 2005-07-13 7:03:28
Message-ID: 200507130903.28642.kleag () free ! fr
[Download RAW message or body]
Hi Andreas,
Thanks for you help. You found the solution. I thinked that player adding was
asynchronous only for network players and thus did not connect to
playerJoinedGame as I had only local players up to now. So, it was working
just by chance... Note that I compiled KDE3.4.1 myself and now it works
again... by chance :-)
I will correct the program to make things cleanly.
Le Mercredi 13 Juillet 2005 06:16, Andreas Beckermann a écrit :
> On Sunday 03 July 2005 22:40, Kleag wrote:
> Why do you think the player isn't added? "seems not to be added" is not very
> descriptive...
I used exactly the method below to test the addition: creating player by
passing the KGame to it and then using playerCount.
> >
> It could, yes. By default KGame messages work asynchronously, so
> kdDebug() << playerCount() << endl;
> addPlayer(newPlayer);
> kdDebug() << playerCount() << endl;
> will output the same playerCount() value twice. The "newPlayer" has not yet
> been added at this point.
> So you need to wait until the new player has been added (i.e.
> KGame::signalPlayerJoinedGame() got emitted)
Kleag
--
KsirK - a turn-based strategy game for KDE
http://gna.org/projects/ksirk
KGraphViewer - a GraphViz dot graphs viewer
http://gna.org/projects/kgraphviewer
_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic