[Kde-games-devel] KGame patch
Albert Astals Cid
aacid at kde.org
Tue Feb 27 20:30:51 CET 2007
A Dimarts 27 Febrer 2007, Kleag va escriure:
> Hello,
>
> With KDE4, KsirK network mode was not working anymore (crash during network
> client connection). The following patch solves the problem for me but I
> would like to know if there is consequences on other games ?
I can't comment as i don't know much of the kgame library, but if it fixes
things for you, just commit it (after all KDE 4 is not in stable shape) and
if it breaks for anyone else then we will notice :-D
Albert
>
> Index: libkdegames/kgame/kgame.cpp
> ===================================================================
> --- libkdegames/kgame/kgame.cpp (révision 636202)
> +++ libkdegames/kgame/kgame.cpp (copie de travail)
> @@ -232,6 +232,13 @@
> // If there is additional data to be loaded before players are loaded
> then do
> // this here.
> emit signalLoadPrePlayers(stream);
> +
> + // Switch back on the direct emitting of signals and emit the
> + // queued signals for properties.
> + // Unlocks properties before loading players in order to make game
> + // initializations related to properties before using them in players
> + // initialization
> + dataHandler()->unlockDirectEmit();
>
> // Load Playerobjects
> uint playercount;
> @@ -252,10 +259,9 @@
> }
>
> // Switch back on the direct emitting of signals and emit the
> - // queued signals.
> + // queued signals for players.
> // Note we habe to have this external locking to prevent the games
> unlocking // to access the players
> - dataHandler()->unlockDirectEmit();
> for ( player=playerList()->first(); player != 0;
> player=playerList()->next() )
> {
> player->dataHandler()->unlockDirectEmit();
>
>
>
> Regards,
>
> Kleag
>
> P.S.: after the comments I add the last time I proposed to import KsirK, I
> decided to do a new refactoring cycle (removing global timer, etc.). This
> one is in its way. The game works localy with AI players (with human(s) or
> not) and it's starting to work in network mode. I hop it will soon be ready
> for playground.
More information about the kde-games-devel
mailing list