diff options
author | mingchen | 2008-05-09 17:40:39 +0000 |
---|---|---|
committer | mingchen | 2008-05-09 17:40:39 +0000 |
commit | 3900a165bcbaf39f8bb4155eba72a8a2aadd13da (patch) | |
tree | b08c7d8f81564586789fc0d59433151993786d65 /OpenSim/Region/Environment/Scenes | |
parent | * Removing console notifications of missing texture request sending (which ir... (diff) | |
download | opensim-SC-3900a165bcbaf39f8bb4155eba72a8a2aadd13da.zip opensim-SC-3900a165bcbaf39f8bb4155eba72a8a2aadd13da.tar.gz opensim-SC-3900a165bcbaf39f8bb4155eba72a8a2aadd13da.tar.bz2 opensim-SC-3900a165bcbaf39f8bb4155eba72a8a2aadd13da.tar.xz |
*Land/Parcel upates are now correct with a significant movement by the Client
*Moved OnSignificantClientMovement to where it is supposed to be - SceneEvents and not ScenePresence
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneEvents.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 13 |
2 files changed, 18 insertions, 11 deletions
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 |