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