From eeeb787f36f77a5c391cd88bca5932d36193e0fe Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 25 Dec 2012 10:50:03 +0200 Subject: 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'. --- OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index e85b7a2..bad7205 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -133,6 +133,7 @@ namespace OpenSim.Region.CoreModules.World.Land m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy; m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy; m_scene.EventManager.OnNewClient += EventManagerOnNewClient; + m_scene.EventManager.OnMakeChildAgent += EventMakeChildAgent; m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement; m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage; 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) { //If we are forcing a position for them to go -- cgit v1.1