Fixed: the AvatarEnteringNewParcel event wasn't triggered in some cases
If an avatar moved between regions: A -> B -> A, then when returning to region A the AvatarEnteringNewParcel wasn't triggered. This happened because the ScenePresence in region A still remembered its previous 'currentParcelUUID', so it appeared as if the avatar didn't change parcels. Now, however, when a ScenePresence becomes a child presence we clear its 'currentParcelUUID'.user_profiles
parent
5097ba81d4
commit
24e486e9df
|
@ -133,6 +133,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy;
|
m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy;
|
||||||
m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy;
|
m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy;
|
||||||
m_scene.EventManager.OnNewClient += EventManagerOnNewClient;
|
m_scene.EventManager.OnNewClient += EventManagerOnNewClient;
|
||||||
|
m_scene.EventManager.OnMakeChildAgent += EventMakeChildAgent;
|
||||||
m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement;
|
m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement;
|
||||||
m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage;
|
m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage;
|
||||||
m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
|
m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
|
||||||
|
@ -218,6 +219,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void EventMakeChildAgent(ScenePresence avatar)
|
||||||
|
{
|
||||||
|
avatar.currentParcelUUID = UUID.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
||||||
{
|
{
|
||||||
//If we are forcing a position for them to go
|
//If we are forcing a position for them to go
|
||||||
|
|
Loading…
Reference in New Issue