setMyAvatarSkin functionality issues

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

whornak
Posts: 86
Joined: 22 Sep 2009, 11:05

setMyAvatarSkin functionality issues

Postby whornak » 16 Oct 2011, 15:24

I am using the setMyAvatarSkin method in the openspace object to broadcast the changes in the players skin to all other clients. My problem is that it seems to be causing the skin property setting twice for the local player.

Based on the documentation the following definition of skin seems to cause the property to set directly and not by way of the setUserVariables.

"This property is set by OpenSpace when the IOpenSpaceAPI.setMyAvatarSkin method is called on the client of the avatar's owner."

So the skin property is set and subsequent skin replacement functionality executed to effect the client side skin change.

The problem:

After the skin is changed by what seems to be a direct call on the client side it is also effected by the setUserVariables broadcast and applies the change again.

This would seem like an easy fix to just skip this second unexpected update but I cannot tell where the property update is coming from to assist with the condition to apply or skip.

Is there some way to know what caused the skin property update to help facilitate the decision making or does it seem like the functionality I am experiencing is not the default behaviour?
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 17 Oct 2011, 06:03

You are right, and this should not happen.
We will fix this as soon as possible. The only workaround that comes to my mind is that you skip the skin change in your avatar class if the same values are passed on the second call.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 26 guests