Re: [RESEND] [PATCH] DirectPlay should keep track of the current number of players
On Wednesday 07 March 2007 10:52, Alessandro Pignotti wrote:
+ /* I think we have to add a player to the total number of players only if it's not a player created for system + purpose like the name server. This way it seems we get a correct player number */ + if( ~dwFlags & DPLAYI_PLAYER_SYSPLAYER ) + This->dp2->lpSessionDesc->dwCurrentPlayers++; + [...] /* FIXME: Should we be storing these dwFlags or the creation ones? */ - lpPData = DP_CreatePlayer( This, lpidPlayer, lpPlayerName, dwFlags, + /* I think we should pass creation flags, so we can distinguish sysplayers and not count them in the current + player total */ + lpPData = DP_CreatePlayer( This, lpidPlayer, lpPlayerName, dwCreateFlags, hEvent, bAnsi );
Every time someone uses "I think" in the code, usually this calls for a test case. This one should be rather straightforward to test. Cheers, Kai -- Kai Blin, <kai Dot blin At gmail Dot com> WorldForge developer http://www.worldforge.org/ Wine developer http://wiki.winehq.org/KaiBlin/ -- Will code for cotton.
participants (1)
-
Kai Blin