aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs13
4 files changed, 19 insertions, 21 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index 341412a..2a28283 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -79,16 +79,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land
79 { 79 {
80 m_scene = scene; 80 m_scene = scene;
81 landIDList.Initialize(); 81 landIDList.Initialize();
82
83 m_scene.EventManager.OnNewPresence += handleNewPresence;
84 }
85
86 private void handleNewPresence(ScenePresence avatar)
87 {
88 if (avatar.IsChildAgent)
89 {
90 avatar.OnSignificantClientMovement += handleSignificantClientMovement;
91 }
92 } 82 }
93 83
94 #region Land Object From Storage Functions 84 #region Land Object From Storage Functions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index 5e65608..a339ebf 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -51,6 +51,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
51 m_scene.EventManager.OnValidateLandBuy += landChannel.handleLandValidationRequest; 51 m_scene.EventManager.OnValidateLandBuy += landChannel.handleLandValidationRequest;
52 m_scene.EventManager.OnLandBuy += landChannel.handleLandBuyRequest; 52 m_scene.EventManager.OnLandBuy += landChannel.handleLandBuyRequest;
53 m_scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient); 53 m_scene.EventManager.OnNewClient += new EventManager.OnNewClientDelegate(EventManager_OnNewClient);
54 m_scene.EventManager.OnSignificantClientMovement += landChannel.handleSignificantClientMovement;
54 55
55 lock (m_scene) 56 lock (m_scene)
56 { 57 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 65dca95..88537e9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -121,6 +121,12 @@ namespace OpenSim.Region.Environment.Scenes
121 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; 121 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
122 122
123 123
124 public delegate void SignificantClientMovement(IClientAPI remote_client);
125
126 public event SignificantClientMovement OnSignificantClientMovement;
127
128
129
124 public delegate void NewGridInstantMessage(GridInstantMessage message); 130 public delegate void NewGridInstantMessage(GridInstantMessage message);
125 131
126 public event NewGridInstantMessage OnGridInstantMessageToIMModule; 132 public event NewGridInstantMessage OnGridInstantMessageToIMModule;
@@ -279,6 +285,7 @@ namespace OpenSim.Region.Environment.Scenes
279 private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; 285 private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
280 private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight 286 private RequestChangeWaterHeight handlerRequestChangeWaterHeight = null; //OnRequestChangeWaterHeight
281 private ScriptControlEvent handlerScriptControlEvent = null; 287 private ScriptControlEvent handlerScriptControlEvent = null;
288 private SignificantClientMovement handlerSignificantClientMovement = null;
282 289
283 private LandBuy handlerLandBuy = null; 290 private LandBuy handlerLandBuy = null;
284 private LandBuy handlerValidateLandBuy = null; 291 private LandBuy handlerValidateLandBuy = null;
@@ -608,6 +615,15 @@ namespace OpenSim.Region.Environment.Scenes
608 } 615 }
609 } 616 }
610 617
618 public void TriggerSignificantClientMovement(IClientAPI client)
619 {
620 handlerSignificantClientMovement = OnSignificantClientMovement;
621 if (handlerSignificantClientMovement != null)
622 {
623 handlerSignificantClientMovement(client);
624
625 }
626 }
611 internal void TriggerControlEvent(uint p, LLUUID scriptUUID, LLUUID avatarID, uint held, uint _changed) 627 internal void TriggerControlEvent(uint p, LLUUID scriptUUID, LLUUID avatarID, uint held, uint _changed)
612 { 628 {
613 handlerScriptControlEvent = OnScriptControlEvent; 629 handlerScriptControlEvent = OnScriptControlEvent;
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 3554289..043d337 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -153,7 +153,6 @@ namespace OpenSim.Region.Environment.Scenes
153 //neighbouring regions we have enabled a child agent in 153 //neighbouring regions we have enabled a child agent in
154 private readonly List<ulong> m_knownChildRegions = new List<ulong>(); 154 private readonly List<ulong> m_knownChildRegions = new List<ulong>();
155 155
156 private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement;
157 156
158 /// <summary> 157 /// <summary>
159 /// Implemented Control Flags 158 /// Implemented Control Flags
@@ -174,10 +173,6 @@ namespace OpenSim.Region.Environment.Scenes
174 /// </summary> 173 /// </summary>
175 private LLVector3 posLastSignificantMove = new LLVector3(); 174 private LLVector3 posLastSignificantMove = new LLVector3();
176 175
177 public delegate void SignificantClientMovement(IClientAPI remote_client);
178
179 public event SignificantClientMovement OnSignificantClientMovement;
180
181 private UpdateQueue m_partsUpdateQueue = new UpdateQueue(); 176 private UpdateQueue m_partsUpdateQueue = new UpdateQueue();
182 private Dictionary<LLUUID, ScenePartUpdate> m_updateTimes = new Dictionary<LLUUID, ScenePartUpdate>(); 177 private Dictionary<LLUUID, ScenePartUpdate> m_updateTimes = new Dictionary<LLUUID, ScenePartUpdate>();
183 178
@@ -1617,12 +1612,8 @@ namespace OpenSim.Region.Environment.Scenes
1617 if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5) 1612 if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5)
1618 { 1613 {
1619 posLastSignificantMove = AbsolutePosition; 1614 posLastSignificantMove = AbsolutePosition;
1620 handlerSignificantClientMovement = OnSignificantClientMovement; 1615 m_scene.EventManager.TriggerSignificantClientMovement(m_controllingClient);
1621 if (handlerSignificantClientMovement != null) 1616 m_scene.NotifyMyCoarseLocationChange();
1622 {
1623 handlerSignificantClientMovement(m_controllingClient);
1624 m_scene.NotifyMyCoarseLocationChange();
1625 }
1626 } 1617 }
1627 1618
1628 // Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m 1619 // Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m