|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Dispatched when the current user's proximity list changes in an MMORoom, after he or another user moved: it reports who and what entered or left his Area of Interest. More...
#include <SFSEvent.h>
Public Attributes | |
| std::shared_ptr< entities::Room > | room |
| The MMORoom the update refers to. | |
| std::vector< std::shared_ptr< entities::User > > | addedUsers |
| The users who entered the current user's Area of Interest. | |
| std::vector< std::shared_ptr< entities::User > > | removedUsers |
| The users who left the current user's Area of Interest. | |
| std::vector< std::shared_ptr< entities::MMOItem > > | addedItems |
| The items that entered the current user's Area of Interest. | |
| std::vector< std::shared_ptr< entities::MMOItem > > | removedItems |
| The items that left the current user's Area of Interest. | |
Dispatched when the current user's proximity list changes in an MMORoom, after he or another user moved: it reports who and what entered or left his Area of Interest.
It is usually caused by a requests::SetUserPositionRequest.
The server sends this at the rate set by requests::MMOSettings::proximityListUpdateMillis, not on every change of position, and it lists only the differences — the users and items already in the Area of Interest are not repeated. The removed lists carry entities that are no longer in proximity: they are already out of the Room, so this is the last chance to read them.
The entry point where an added user or item appeared is available through entities::User::getAOIEntryPoint and entities::MMOItem::getAOIEntryPoint, if the Room was created with requests::MMOSettings::sendAOIEntryPoint left on.