Player to Spectator issue (player ids)

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

tpenn
Posts: 95
Joined: 03 Aug 2010, 18:48

Player to Spectator issue (player ids)

Postby tpenn » 01 Mar 2011, 23:13

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://www.smartfoxserver.com/forums/viewtopic.php?p=42674#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.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 02 Mar 2011, 09:26

Thanks for reporting. Please tell us also if you are using RC1b, or what other server version. We'll look into it soon.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 02 Mar 2011, 13:14

UPDATE: it will be fixed in the next incoming patch.
Lapo

--

gotoAndPlay()

...addicted to flash games
tpenn
Posts: 95
Joined: 03 Aug 2010, 18:48

Postby tpenn » 02 Mar 2011, 16:19

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?
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 03 Mar 2011, 07:56

We should be able to make the patch available early next week.
Paolo Bax
The SmartFoxServer Team
Kai
Posts: 17
Joined: 22 Oct 2009, 16:41

Postby Kai » 14 Mar 2011, 11:09

Awesome, this has been nagging me for a while. Did report back in december - viewtopic.php?t=9629

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 71 guests