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
Oren Hurvitz 2012-12-25 10:50:03 +02:00 committed by Justin Clark-Casey (justincc)
parent 5097ba81d4
commit 24e486e9df
1 changed files with 6 additions and 0 deletions

View File

@ -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