onAvatarMovementEnd is being called more than once

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

Moderators: Lapo, Bax

Post Reply
pt_dev
Posts: 37
Joined: 15 Sep 2008, 16:15

onAvatarMovementEnd is being called more than once

Post by pt_dev »

Hi,

I am having hard time to figure out what is going on with the function.
What I am trying to do is that whenever an avatar stops then call extension to save location such as x and y coordinates. However, somehow, the extension has being called same number of time as number of user log in such as if there are two users login then extension will be called twice.

FYI, I don't use any loop.


any help would be appreciated. Let me know if you need more information.


Thanks,
- pt_dev
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

The "onAvatarMovementEnd" is fired by all the avatars moving on your client, so you will have to "filter" those events and catch only those related to your own avatar (by means of the avatar id contained in the event's parameters).
Also make sure you are not registering to that event each time a user enters the map.
Paolo Bax
The SmartFoxServer Team
pt_dev
Posts: 37
Joined: 15 Sep 2008, 16:15

Post by pt_dev »

Thanks bax.
Post Reply