Page 1 of 1

Player to Spectator issue (player ids)

Posted: 01 Mar 2011, 23:13
by tpenn
I have encountered a bug with player ids and switching from player to spectator. I originally posted on the unity client board, but I have since determined this is a server issue. First post here: http://forums.smartfoxserver.com/viewto ... 2674#42674

Basically it boils down to this. When SFSApi.PlayerToSpectator is called, instead of freeing the User's PlayerId with IPlayerIdGenerator.freePlayerSlot, getPlayerSlot is called instead. This results in the server not believing the player is a spectator (User.isSpectator returns false), and the incorrect PlayerId is communicated to clients. This essentially "leaks" PlayerIds, as those Ids are never freed, and switching back and forth enough times will exhaust the room's supply of valid PlayerIds.

Thanks in advance for giving this issue some attention.

Posted: 02 Mar 2011, 09:26
by Lapo
Thanks for reporting. Please tell us also if you are using RC1b, or what other server version. We'll look into it soon.

Posted: 02 Mar 2011, 13:14
by Lapo
UPDATE: it will be fixed in the next incoming patch.

Posted: 02 Mar 2011, 16:19
by tpenn
Thank you very much.

Do you know when the patch is expected? We have a milestone next week that includes our spectator mode, and I would like to be able to deliver that.

If the patch is not likely to be in time for us, is there any possibility of getting an advance copy via email?

Posted: 03 Mar 2011, 07:56
by Bax
We should be able to make the patch available early next week.

Posted: 14 Mar 2011, 11:09
by Kai
Awesome, this has been nagging me for a while. Did report back in december - http://forums.smartfoxserver.com/viewtopic.php?t=9629