From 855fb58c9650086122b76c586c4a4a408343143f Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Sat, 5 Sep 2009 02:58:35 -0400 Subject: * Moves ScenePresence SendCourseLocations to a delegate and provide a method to replace the delegate * RegionCombinerModule replaces this delegate and distributes the CoarseLocationUpdates through the client connection in the region where the user would be if it was a separate region. * Fixes Mini Map display on combined regions. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 857dc11..1024857 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -62,6 +62,8 @@ namespace OpenSim.Region.Framework.Scenes public ScriptControlled eventControls; } + public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence); + public class ScenePresence : EntityBase { // ~ScenePresence() @@ -87,12 +89,15 @@ namespace OpenSim.Region.Framework.Scenes public Vector3 lastKnownAllowedPosition; public bool sentMessageAboutRestrictedParcelFlyingDown; + + private bool m_updateflag; private byte m_movementflag; private readonly List m_forcesList = new List(); private short m_updateCount; private uint m_requestedSitTargetID; private UUID m_requestedSitTargetUUID = UUID.Zero; + private SendCourseLocationsMethod m_sendCourseLocationsMethod; private bool m_startAnimationSet; @@ -616,6 +621,7 @@ namespace OpenSim.Region.Framework.Scenes private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) { + m_sendCourseLocationsMethod = SendCoarseLocationsDefault; CreateSceneViewer(); m_regionHandle = reginfo.RegionHandle; m_controllingClient = client; @@ -2458,6 +2464,21 @@ namespace OpenSim.Region.Framework.Scenes public void SendCoarseLocations() { + SendCourseLocationsMethod d = m_sendCourseLocationsMethod; + if (d != null) + { + d.Invoke(m_scene.RegionInfo.originRegionID, this); + } + } + + public void SetSendCourseLocationMethod(SendCourseLocationsMethod d) + { + if (d != null) + m_sendCourseLocationsMethod = d; + } + + public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p) + { m_perfMonMS = Environment.TickCount; List CoarseLocations = new List(); @@ -3302,6 +3323,7 @@ namespace OpenSim.Region.Framework.Scenes { Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); DefaultTexture = textu.GetBytes(); + } public class NewForce @@ -3431,6 +3453,7 @@ namespace OpenSim.Region.Framework.Scenes Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); DefaultTexture = textu.GetBytes(); } + m_sendCourseLocationsMethod = SendCoarseLocationsDefault; CreateSceneViewer(); } -- cgit v1.1