diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
14 files changed, 1039 insertions, 1017 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index bc3e06c..40caabc 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
63 | get { return m_name; } | 63 | get { return m_name; } |
64 | set { m_name = value; } | 64 | set { m_name = value; } |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Signals whether this group was in a scene but has since been deleted from it. | 68 | /// Signals whether this group was in a scene but has since been deleted from it. |
69 | /// </summary> | 69 | /// </summary> |
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
71 | { | 71 | { |
72 | get { return m_isDeleted; } | 72 | get { return m_isDeleted; } |
73 | } | 73 | } |
74 | protected bool m_isDeleted; | 74 | protected bool m_isDeleted; |
75 | 75 | ||
76 | protected LLVector3 m_pos; | 76 | protected LLVector3 m_pos; |
77 | 77 | ||
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index 2b1adee..1dd2273 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs | |||
@@ -131,13 +131,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | 131 | ||
132 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; | 132 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; |
133 | 133 | ||
134 | |||
135 | public delegate void SignificantClientMovement(IClientAPI remote_client); | 134 | public delegate void SignificantClientMovement(IClientAPI remote_client); |
136 | 135 | ||
137 | public event SignificantClientMovement OnSignificantClientMovement; | 136 | public event SignificantClientMovement OnSignificantClientMovement; |
138 | 137 | ||
139 | |||
140 | |||
141 | public delegate void NewGridInstantMessage(GridInstantMessage message); | 138 | public delegate void NewGridInstantMessage(GridInstantMessage message); |
142 | 139 | ||
143 | public event NewGridInstantMessage OnGridInstantMessageToIMModule; | 140 | public event NewGridInstantMessage OnGridInstantMessageToIMModule; |
@@ -163,7 +160,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
163 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; | 160 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; |
164 | 161 | ||
165 | public delegate void ScriptNotAtTargetEvent(uint localID); | 162 | public delegate void ScriptNotAtTargetEvent(uint localID); |
166 | 163 | ||
167 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; | 164 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; |
168 | 165 | ||
169 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); | 166 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); |
@@ -172,8 +169,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
172 | public event ScriptColliding OnScriptColliding; | 169 | public event ScriptColliding OnScriptColliding; |
173 | public event ScriptColliding OnScriptCollidingEnd; | 170 | public event ScriptColliding OnScriptCollidingEnd; |
174 | 171 | ||
175 | |||
176 | |||
177 | public delegate void OnMakeChildAgentDelegate(ScenePresence presence); | 172 | public delegate void OnMakeChildAgentDelegate(ScenePresence presence); |
178 | public event OnMakeChildAgentDelegate OnMakeChildAgent; | 173 | public event OnMakeChildAgentDelegate OnMakeChildAgent; |
179 | 174 | ||
@@ -289,7 +284,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
289 | public int transactionID = 0; | 284 | public int transactionID = 0; |
290 | public int amountDebited = 0; | 285 | public int amountDebited = 0; |
291 | 286 | ||
292 | |||
293 | public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned, | 287 | public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned, |
294 | bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, | 288 | bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, |
295 | bool pauthenticated) | 289 | bool pauthenticated) |
@@ -306,8 +300,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
306 | } | 300 | } |
307 | } | 301 | } |
308 | 302 | ||
309 | |||
310 | |||
311 | public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e); | 303 | public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e); |
312 | 304 | ||
313 | public delegate void LandBuy(Object sender, LandBuyArgs e); | 305 | public delegate void LandBuy(Object sender, LandBuyArgs e); |
@@ -377,7 +369,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
377 | private ScriptColliding handlerColliding = null; | 369 | private ScriptColliding handlerColliding = null; |
378 | private ScriptColliding handlerCollidingEnd = null; | 370 | private ScriptColliding handlerCollidingEnd = null; |
379 | 371 | ||
380 | |||
381 | private SunLindenHour handlerSunGetLindenHour = null; | 372 | private SunLindenHour handlerSunGetLindenHour = null; |
382 | 373 | ||
383 | public void TriggerOnScriptChangedEvent(uint localID, uint change) | 374 | public void TriggerOnScriptChangedEvent(uint localID, uint change) |
@@ -491,7 +482,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
491 | if (handlerObjectBeingRemovedFromScene != null) | 482 | if (handlerObjectBeingRemovedFromScene != null) |
492 | { | 483 | { |
493 | handlerObjectBeingRemovedFromScene(obj); | 484 | handlerObjectBeingRemovedFromScene(obj); |
494 | |||
495 | } | 485 | } |
496 | } | 486 | } |
497 | 487 | ||
@@ -641,7 +631,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
641 | { | 631 | { |
642 | handlerGridInstantMessageToFriends(message); | 632 | handlerGridInstantMessageToFriends(message); |
643 | } | 633 | } |
644 | |||
645 | } | 634 | } |
646 | } | 635 | } |
647 | 636 | ||
@@ -698,7 +687,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
698 | handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel); | 687 | handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel); |
699 | } | 688 | } |
700 | } | 689 | } |
701 | public void TriggerLandBuy (Object sender, LandBuyArgs e) | 690 | |
691 | public void TriggerLandBuy(Object sender, LandBuyArgs e) | ||
702 | { | 692 | { |
703 | handlerLandBuy = OnLandBuy; | 693 | handlerLandBuy = OnLandBuy; |
704 | if (handlerLandBuy != null) | 694 | if (handlerLandBuy != null) |
@@ -706,6 +696,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
706 | handlerLandBuy(sender, e); | 696 | handlerLandBuy(sender, e); |
707 | } | 697 | } |
708 | } | 698 | } |
699 | |||
709 | public void TriggerValidateLandBuy(Object sender, LandBuyArgs e) | 700 | public void TriggerValidateLandBuy(Object sender, LandBuyArgs e) |
710 | { | 701 | { |
711 | handlerValidateLandBuy = OnValidateLandBuy; | 702 | handlerValidateLandBuy = OnValidateLandBuy; |
@@ -741,6 +732,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
741 | handlerRequestChangeWaterHeight(height); | 732 | handlerRequestChangeWaterHeight(height); |
742 | } | 733 | } |
743 | } | 734 | } |
735 | |||
744 | public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar) | 736 | public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar) |
745 | { | 737 | { |
746 | handlerAvatarKill = OnAvatarKilled; | 738 | handlerAvatarKill = OnAvatarKilled; |
@@ -756,7 +748,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
756 | if (handlerSignificantClientMovement != null) | 748 | if (handlerSignificantClientMovement != null) |
757 | { | 749 | { |
758 | handlerSignificantClientMovement(client); | 750 | handlerSignificantClientMovement(client); |
759 | |||
760 | } | 751 | } |
761 | } | 752 | } |
762 | 753 | ||
@@ -787,7 +778,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
787 | } | 778 | } |
788 | } | 779 | } |
789 | 780 | ||
790 | |||
791 | public void TriggerNoticeNoLandDataFromStorage() | 781 | public void TriggerNoticeNoLandDataFromStorage() |
792 | { | 782 | { |
793 | handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage; | 783 | handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage; |
@@ -818,26 +808,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
818 | } | 808 | } |
819 | } | 809 | } |
820 | 810 | ||
821 | |||
822 | |||
823 | public void TriggerRequestParcelPrimCountUpdate() | 811 | public void TriggerRequestParcelPrimCountUpdate() |
824 | { | 812 | { |
825 | handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate; | 813 | handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate; |
826 | if (handlerRequestParcelPrimCountUpdate != null) | 814 | if (handlerRequestParcelPrimCountUpdate != null) |
827 | { | 815 | { |
828 | handlerRequestParcelPrimCountUpdate(); | 816 | handlerRequestParcelPrimCountUpdate(); |
829 | |||
830 | } | 817 | } |
831 | } | 818 | } |
819 | |||
832 | public void TriggerParcelPrimCountTainted() | 820 | public void TriggerParcelPrimCountTainted() |
833 | { | 821 | { |
834 | handlerParcelPrimCountTainted = OnParcelPrimCountTainted; | 822 | handlerParcelPrimCountTainted = OnParcelPrimCountTainted; |
835 | if (handlerParcelPrimCountTainted != null) | 823 | if (handlerParcelPrimCountTainted != null) |
836 | { | 824 | { |
837 | handlerParcelPrimCountTainted(); | 825 | handlerParcelPrimCountTainted(); |
838 | |||
839 | } | 826 | } |
840 | } | 827 | } |
828 | |||
841 | // this lets us keep track of nasty script events like timer, etc. | 829 | // this lets us keep track of nasty script events like timer, etc. |
842 | public void TriggerTimerEvent(uint objLocalID, double Interval) | 830 | public void TriggerTimerEvent(uint objLocalID, double Interval) |
843 | { | 831 | { |
@@ -845,9 +833,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
845 | if (handlerScriptTimerEvent != null) | 833 | if (handlerScriptTimerEvent != null) |
846 | { | 834 | { |
847 | handlerScriptTimerEvent(objLocalID, Interval); | 835 | handlerScriptTimerEvent(objLocalID, Interval); |
848 | |||
849 | } | 836 | } |
850 | |||
851 | } | 837 | } |
852 | 838 | ||
853 | public void TriggerEstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float LindenHour) | 839 | public void TriggerEstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float LindenHour) |
@@ -875,19 +861,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
875 | if (handlerCollidingStart != null) | 861 | if (handlerCollidingStart != null) |
876 | handlerCollidingStart(localId, colliders); | 862 | handlerCollidingStart(localId, colliders); |
877 | } | 863 | } |
864 | |||
878 | public void TriggerScriptColliding(uint localId, ColliderArgs colliders) | 865 | public void TriggerScriptColliding(uint localId, ColliderArgs colliders) |
879 | { | 866 | { |
880 | |||
881 | handlerColliding = OnScriptColliding; | 867 | handlerColliding = OnScriptColliding; |
882 | if (handlerColliding != null) | 868 | if (handlerColliding != null) |
883 | handlerColliding(localId, colliders); | 869 | handlerColliding(localId, colliders); |
884 | } | 870 | } |
871 | |||
885 | public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders) | 872 | public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders) |
886 | { | 873 | { |
887 | handlerCollidingEnd = OnScriptCollidingEnd; | 874 | handlerCollidingEnd = OnScriptCollidingEnd; |
888 | if (handlerCollidingEnd != null) | 875 | if (handlerCollidingEnd != null) |
889 | handlerCollidingEnd(localId, colliders); | 876 | handlerCollidingEnd(localId, colliders); |
890 | } | 877 | } |
891 | |||
892 | } | 878 | } |
893 | } | 879 | } |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 3021891..6695dbf 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
96 | // Then we've got to remove the previous | 96 | // Then we've got to remove the previous |
97 | // event handler | 97 | // event handler |
98 | 98 | ||
99 | if (_PhyScene != null) | 99 | if (_PhyScene != null) |
100 | _PhyScene.OnPhysicsCrash -= physicsBasedCrash; | 100 | _PhyScene.OnPhysicsCrash -= physicsBasedCrash; |
101 | 101 | ||
102 | _PhyScene = value; | 102 | _PhyScene = value; |
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
194 | /// </param> | 194 | /// </param> |
195 | /// <returns> | 195 | /// <returns> |
196 | /// true if the object was added, false if an object with the same uuid was already in the scene | 196 | /// true if the object was added, false if an object with the same uuid was already in the scene |
197 | /// </returns> | 197 | /// </returns> |
198 | protected internal bool AddRestoredSceneObject( | 198 | protected internal bool AddRestoredSceneObject( |
199 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | 199 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) |
200 | { | 200 | { |
@@ -205,7 +205,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
205 | { | 205 | { |
206 | part.LocalId = m_parentScene.PrimIDAllocate(); | 206 | part.LocalId = m_parentScene.PrimIDAllocate(); |
207 | } | 207 | } |
208 | 208 | ||
209 | sceneObject.UpdateParentIDs(); | 209 | sceneObject.UpdateParentIDs(); |
210 | 210 | ||
211 | if (!alreadyPersisted) | 211 | if (!alreadyPersisted) |
@@ -213,10 +213,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
213 | sceneObject.ForceInventoryPersistence(); | 213 | sceneObject.ForceInventoryPersistence(); |
214 | sceneObject.HasGroupChanged = true; | 214 | sceneObject.HasGroupChanged = true; |
215 | } | 215 | } |
216 | 216 | ||
217 | return AddSceneObject(sceneObject, attachToBackup); | 217 | return AddSceneObject(sceneObject, attachToBackup); |
218 | } | 218 | } |
219 | 219 | ||
220 | /// <summary> | 220 | /// <summary> |
221 | /// Add a newly created object to the scene. This will both update the scene, and send information about the | 221 | /// Add a newly created object to the scene. This will both update the scene, and send information about the |
222 | /// new object to all clients interested in the scene. | 222 | /// new object to all clients interested in the scene. |
@@ -228,12 +228,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
228 | /// </param> | 228 | /// </param> |
229 | /// <returns> | 229 | /// <returns> |
230 | /// true if the object was added, false if an object with the same uuid was already in the scene | 230 | /// true if the object was added, false if an object with the same uuid was already in the scene |
231 | /// </returns> | 231 | /// </returns> |
232 | protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | 232 | protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) |
233 | { | 233 | { |
234 | // Ensure that we persist this new scene object | 234 | // Ensure that we persist this new scene object |
235 | sceneObject.HasGroupChanged = true; | 235 | sceneObject.HasGroupChanged = true; |
236 | 236 | ||
237 | return AddSceneObject(sceneObject, attachToBackup); | 237 | return AddSceneObject(sceneObject, attachToBackup); |
238 | } | 238 | } |
239 | 239 | ||
@@ -252,7 +252,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
252 | { | 252 | { |
253 | sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim); | 253 | sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim); |
254 | sceneObject.ScheduleGroupForFullUpdate(); | 254 | sceneObject.ScheduleGroupForFullUpdate(); |
255 | 255 | ||
256 | lock (Entities) | 256 | lock (Entities) |
257 | { | 257 | { |
258 | if (!Entities.ContainsKey(sceneObject.UUID)) | 258 | if (!Entities.ContainsKey(sceneObject.UUID)) |
@@ -261,8 +261,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
261 | Entities.Add(sceneObject.UUID, sceneObject); | 261 | Entities.Add(sceneObject.UUID, sceneObject); |
262 | m_numPrim += sceneObject.Children.Count; | 262 | m_numPrim += sceneObject.Children.Count; |
263 | 263 | ||
264 | if (attachToBackup) | 264 | if (attachToBackup) |
265 | sceneObject.AttachToBackup(); | 265 | sceneObject.AttachToBackup(); |
266 | 266 | ||
267 | return true; | 267 | return true; |
268 | } | 268 | } |
@@ -342,7 +342,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
342 | "[INNER SCENE]: Failed to update {0}, {1} - {2}", entity.Name, entity.UUID, e); | 342 | "[INNER SCENE]: Failed to update {0}, {1} - {2}", entity.Name, entity.UUID, e); |
343 | } | 343 | } |
344 | } | 344 | } |
345 | 345 | ||
346 | m_updateList.Clear(); | 346 | m_updateList.Clear(); |
347 | } | 347 | } |
348 | } | 348 | } |
@@ -555,7 +555,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
555 | protected internal void AddScenePresence(ScenePresence presence) | 555 | protected internal void AddScenePresence(ScenePresence presence) |
556 | { | 556 | { |
557 | bool child = presence.IsChildAgent; | 557 | bool child = presence.IsChildAgent; |
558 | 558 | ||
559 | if (child) | 559 | if (child) |
560 | { | 560 | { |
561 | m_numChildAgents++; | 561 | m_numChildAgents++; |
@@ -598,7 +598,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
598 | { | 598 | { |
599 | if (!ScenePresences.Remove(agentID)) | 599 | if (!ScenePresences.Remove(agentID)) |
600 | { | 600 | { |
601 | m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); | 601 | m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); |
602 | } | 602 | } |
603 | // else | 603 | // else |
604 | // { | 604 | // { |
@@ -774,7 +774,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
774 | /// Get a scene object group that contains the prim with the given uuid | 774 | /// Get a scene object group that contains the prim with the given uuid |
775 | /// </summary> | 775 | /// </summary> |
776 | /// <param name="fullID"></param> | 776 | /// <param name="fullID"></param> |
777 | /// <returns>null if no scene object group containing that prim is found</returns> | 777 | /// <returns>null if no scene object group containing that prim is found</returns> |
778 | private SceneObjectGroup GetGroupByPrim(LLUUID fullID) | 778 | private SceneObjectGroup GetGroupByPrim(LLUUID fullID) |
779 | { | 779 | { |
780 | List<EntityBase> EntityList = GetEntities(); | 780 | List<EntityBase> EntityList = GetEntities(); |
@@ -823,7 +823,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
823 | protected internal SceneObjectPart GetSceneObjectPart(uint localID) | 823 | protected internal SceneObjectPart GetSceneObjectPart(uint localID) |
824 | { | 824 | { |
825 | SceneObjectGroup group = GetGroupByPrim(localID); | 825 | SceneObjectGroup group = GetGroupByPrim(localID); |
826 | 826 | ||
827 | if (group != null) | 827 | if (group != null) |
828 | return group.GetChildPart(localID); | 828 | return group.GetChildPart(localID); |
829 | else | 829 | else |
@@ -834,7 +834,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
834 | /// Get a part contained in this scene. | 834 | /// Get a part contained in this scene. |
835 | /// </summary> | 835 | /// </summary> |
836 | /// <param name="fullID"></param> | 836 | /// <param name="fullID"></param> |
837 | /// <returns>null if the part was not found</returns> | 837 | /// <returns>null if the part was not found</returns> |
838 | protected internal SceneObjectPart GetSceneObjectPart(LLUUID fullID) | 838 | protected internal SceneObjectPart GetSceneObjectPart(LLUUID fullID) |
839 | { | 839 | { |
840 | SceneObjectGroup group = GetGroupByPrim(fullID); | 840 | SceneObjectGroup group = GetGroupByPrim(fullID); |
@@ -1089,7 +1089,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1089 | group.SendGroupTerseUpdate(); | 1089 | group.SendGroupTerseUpdate(); |
1090 | return; | 1090 | return; |
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment) | 1093 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment) |
1094 | { | 1094 | { |
1095 | group.UpdateSinglePosition(pos, localID); | 1095 | group.UpdateSinglePosition(pos, localID); |
@@ -1119,7 +1119,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1119 | if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.IsAttachment) | 1119 | if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.IsAttachment) |
1120 | { | 1120 | { |
1121 | group.SendGroupTerseUpdate(); | 1121 | group.SendGroupTerseUpdate(); |
1122 | 1122 | ||
1123 | return; | 1123 | return; |
1124 | } | 1124 | } |
1125 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment) | 1125 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment) |
@@ -1397,14 +1397,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1397 | if (sendEvents) | 1397 | if (sendEvents) |
1398 | parenPrim.TriggerScriptChangedEvent(Changed.LINK); | 1398 | parenPrim.TriggerScriptChangedEvent(Changed.LINK); |
1399 | } | 1399 | } |
1400 | else | 1400 | else |
1401 | { | 1401 | { |
1402 | // The link set has prims remaining. This path is taken | 1402 | // The link set has prims remaining. This path is taken |
1403 | // when a subset of a link set's prims are selected | 1403 | // when a subset of a link set's prims are selected |
1404 | // and the root prim is part of that selection | 1404 | // and the root prim is part of that selection |
1405 | // | 1405 | // |
1406 | List<SceneObjectPart> parts = new List<SceneObjectPart>(parenPrim.Children.Values); | 1406 | List<SceneObjectPart> parts = new List<SceneObjectPart>(parenPrim.Children.Values); |
1407 | 1407 | ||
1408 | List<uint> unlink_ids = new List<uint>(); | 1408 | List<uint> unlink_ids = new List<uint>(); |
1409 | foreach (SceneObjectPart unlink_part in parts) | 1409 | foreach (SceneObjectPart unlink_part in parts) |
1410 | unlink_ids.Add(unlink_part.LocalId); | 1410 | unlink_ids.Add(unlink_part.LocalId); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index fe66dd5..0148d76 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -242,9 +242,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
242 | 242 | ||
243 | // Retrieve item | 243 | // Retrieve item |
244 | TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId); | 244 | TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId); |
245 | 245 | ||
246 | if (null == item) | 246 | if (null == item) |
247 | { | 247 | { |
248 | m_log.ErrorFormat( | 248 | m_log.ErrorFormat( |
249 | "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for caps script update " | 249 | "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for caps script update " |
250 | + " but the item does not exist in this inventory", | 250 | + " but the item does not exist in this inventory", |
@@ -338,7 +338,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
338 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 338 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
339 | else | 339 | else |
340 | item.CreationDate = itemUpd.CreationDate; | 340 | item.CreationDate = itemUpd.CreationDate; |
341 | |||
342 | 341 | ||
343 | // TODO: Check if folder changed and move item | 342 | // TODO: Check if folder changed and move item |
344 | //item.NextPermissions = itemUpd.Folder; | 343 | //item.NextPermissions = itemUpd.Folder; |
@@ -577,7 +576,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
577 | asset.Type = assetType; | 576 | asset.Type = assetType; |
578 | asset.FullID = LLUUID.Random(); | 577 | asset.FullID = LLUUID.Random(); |
579 | asset.Data = (data == null) ? new byte[1] : data; | 578 | asset.Data = (data == null) ? new byte[1] : data; |
580 | 579 | ||
581 | return asset; | 580 | return asset; |
582 | } | 581 | } |
583 | 582 | ||
@@ -958,7 +957,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
958 | agentItem.Folder = folderId; | 957 | agentItem.Folder = folderId; |
959 | AddInventoryItem(remoteClient, agentItem); | 958 | AddInventoryItem(remoteClient, agentItem); |
960 | } | 959 | } |
961 | 960 | ||
962 | /// <summary> | 961 | /// <summary> |
963 | /// <see>ClientMoveTaskInventoryItem</see> | 962 | /// <see>ClientMoveTaskInventoryItem</see> |
964 | /// </summary> | 963 | /// </summary> |
@@ -981,13 +980,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
981 | } | 980 | } |
982 | 981 | ||
983 | TaskInventoryItem taskItem = part.GetInventoryItem(itemId); | 982 | TaskInventoryItem taskItem = part.GetInventoryItem(itemId); |
984 | 983 | ||
985 | if (null == taskItem) | 984 | if (null == taskItem) |
986 | { | 985 | { |
987 | m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed" | 986 | m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed" |
988 | + " because the inventory item could not be found", | 987 | + " because the inventory item could not be found", |
989 | itemId, primLocalId); | 988 | itemId, primLocalId); |
990 | 989 | ||
991 | return; | 990 | return; |
992 | } | 991 | } |
993 | 992 | ||
@@ -997,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
997 | 996 | ||
998 | MoveTaskInventoryItem(remoteClient, folderId, part, itemId); | 997 | MoveTaskInventoryItem(remoteClient, folderId, part, itemId); |
999 | } | 998 | } |
1000 | 999 | ||
1001 | /// <summary> | 1000 | /// <summary> |
1002 | /// <see>MoveTaskInventoryItem</see> | 1001 | /// <see>MoveTaskInventoryItem</see> |
1003 | /// </summary> | 1002 | /// </summary> |
@@ -1029,7 +1028,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1029 | AddInventoryItem(avatarId, agentItem); | 1028 | AddInventoryItem(avatarId, agentItem); |
1030 | } | 1029 | } |
1031 | } | 1030 | } |
1032 | 1031 | ||
1033 | /// <summary> | 1032 | /// <summary> |
1034 | /// Copy a task (prim) inventory item to another task (prim) | 1033 | /// Copy a task (prim) inventory item to another task (prim) |
1035 | /// </summary> | 1034 | /// </summary> |
@@ -1049,7 +1048,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1049 | 1048 | ||
1050 | return; | 1049 | return; |
1051 | } | 1050 | } |
1052 | 1051 | ||
1053 | SceneObjectPart destPart = GetSceneObjectPart(destId); | 1052 | SceneObjectPart destPart = GetSceneObjectPart(destId); |
1054 | 1053 | ||
1055 | if (destPart == null) | 1054 | if (destPart == null) |
@@ -1060,7 +1059,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1060 | destId); | 1059 | destId); |
1061 | return; | 1060 | return; |
1062 | } | 1061 | } |
1063 | 1062 | ||
1064 | if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) | 1063 | if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) |
1065 | { | 1064 | { |
1066 | // object cannot copy items to an object owned by a different owner | 1065 | // object cannot copy items to an object owned by a different owner |
@@ -1076,7 +1075,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1076 | } | 1075 | } |
1077 | 1076 | ||
1078 | TaskInventoryItem destTaskItem = new TaskInventoryItem(); | 1077 | TaskInventoryItem destTaskItem = new TaskInventoryItem(); |
1079 | 1078 | ||
1080 | destTaskItem.ItemID = LLUUID.Random(); | 1079 | destTaskItem.ItemID = LLUUID.Random(); |
1081 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1080 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1082 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1081 | destTaskItem.AssetID = srcTaskItem.AssetID; |
@@ -1091,7 +1090,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1091 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions; | 1090 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions; |
1092 | destTaskItem.NextPermissions = srcTaskItem.NextPermissions; | 1091 | destTaskItem.NextPermissions = srcTaskItem.NextPermissions; |
1093 | destTaskItem.Flags = srcTaskItem.Flags; | 1092 | destTaskItem.Flags = srcTaskItem.Flags; |
1094 | 1093 | ||
1095 | if (destPart.OwnerID != part.OwnerID) | 1094 | if (destPart.OwnerID != part.OwnerID) |
1096 | { | 1095 | { |
1097 | if (ExternalChecks.ExternalChecksPropagatePermissions()) | 1096 | if (ExternalChecks.ExternalChecksPropagatePermissions()) |
@@ -1112,20 +1111,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
1112 | destTaskItem.Name = srcTaskItem.Name; | 1111 | destTaskItem.Name = srcTaskItem.Name; |
1113 | destTaskItem.InvType = srcTaskItem.InvType; | 1112 | destTaskItem.InvType = srcTaskItem.InvType; |
1114 | destTaskItem.Type = srcTaskItem.Type; | 1113 | destTaskItem.Type = srcTaskItem.Type; |
1115 | 1114 | ||
1116 | destPart.AddInventoryItem(destTaskItem); | 1115 | destPart.AddInventoryItem(destTaskItem); |
1117 | 1116 | ||
1118 | if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 1117 | if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
1119 | part.RemoveInventoryItem(itemId); | 1118 | part.RemoveInventoryItem(itemId); |
1120 | 1119 | ||
1121 | ScenePresence avatar; | 1120 | ScenePresence avatar; |
1122 | 1121 | ||
1123 | if (TryGetAvatar(srcTaskItem.OwnerID, out avatar)) | 1122 | if (TryGetAvatar(srcTaskItem.OwnerID, out avatar)) |
1124 | { | 1123 | { |
1125 | destPart.GetProperties(avatar.ControllingClient); | 1124 | destPart.GetProperties(avatar.ControllingClient); |
1126 | } | 1125 | } |
1127 | } | 1126 | } |
1128 | 1127 | ||
1129 | public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items) | 1128 | public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items) |
1130 | { | 1129 | { |
1131 | CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); | 1130 | CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); |
@@ -1139,7 +1138,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1139 | } | 1138 | } |
1140 | 1139 | ||
1141 | LLUUID newFolderID = LLUUID.Random(); | 1140 | LLUUID newFolderID = LLUUID.Random(); |
1142 | 1141 | ||
1143 | profile.CreateFolder(category, newFolderID, 0xffff, profile.RootFolder.ID); | 1142 | profile.CreateFolder(category, newFolderID, 0xffff, profile.RootFolder.ID); |
1144 | 1143 | ||
1145 | foreach (LLUUID itemID in items) | 1144 | foreach (LLUUID itemID in items) |
@@ -1346,7 +1345,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1346 | 1345 | ||
1347 | part.AddInventoryItem(taskItem); | 1346 | part.AddInventoryItem(taskItem); |
1348 | part.GetProperties(remoteClient); | 1347 | part.GetProperties(remoteClient); |
1349 | 1348 | ||
1350 | part.CreateScriptInstance(taskItem, 0, false); | 1349 | part.CreateScriptInstance(taskItem, 0, false); |
1351 | } | 1350 | } |
1352 | } | 1351 | } |
@@ -1370,7 +1369,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1370 | 1369 | ||
1371 | return; | 1370 | return; |
1372 | } | 1371 | } |
1373 | 1372 | ||
1374 | SceneObjectPart destPart = GetSceneObjectPart(destId); | 1373 | SceneObjectPart destPart = GetSceneObjectPart(destId); |
1375 | 1374 | ||
1376 | if (destPart == null) | 1375 | if (destPart == null) |
@@ -1381,7 +1380,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1381 | destId); | 1380 | destId); |
1382 | return; | 1381 | return; |
1383 | } | 1382 | } |
1384 | 1383 | ||
1385 | // Must own the object, and have modify rights | 1384 | // Must own the object, and have modify rights |
1386 | if (srcPart.OwnerID != destPart.OwnerID) | 1385 | if (srcPart.OwnerID != destPart.OwnerID) |
1387 | return; | 1386 | return; |
@@ -1395,14 +1394,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1395 | "[PRIM INVENTORY]: " + | 1394 | "[PRIM INVENTORY]: " + |
1396 | "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}", | 1395 | "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}", |
1397 | srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin); | 1396 | srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin); |
1398 | // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL - | 1397 | // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL - |
1399 | // "Object: Task Object trying to illegally load script onto task Other_Object!" | 1398 | // "Object: Task Object trying to illegally load script onto task Other_Object!" |
1400 | // How do we shout from in here? | 1399 | // How do we shout from in here? |
1401 | return; | 1400 | return; |
1402 | } | 1401 | } |
1403 | 1402 | ||
1404 | TaskInventoryItem destTaskItem = new TaskInventoryItem(); | 1403 | TaskInventoryItem destTaskItem = new TaskInventoryItem(); |
1405 | 1404 | ||
1406 | destTaskItem.ItemID = LLUUID.Random(); | 1405 | destTaskItem.ItemID = LLUUID.Random(); |
1407 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1406 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1408 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1407 | destTaskItem.AssetID = srcTaskItem.AssetID; |
@@ -1417,7 +1416,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1417 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions; | 1416 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions; |
1418 | destTaskItem.NextPermissions = srcTaskItem.NextPermissions; | 1417 | destTaskItem.NextPermissions = srcTaskItem.NextPermissions; |
1419 | destTaskItem.Flags = srcTaskItem.Flags; | 1418 | destTaskItem.Flags = srcTaskItem.Flags; |
1420 | 1419 | ||
1421 | if (destPart.OwnerID != srcPart.OwnerID) | 1420 | if (destPart.OwnerID != srcPart.OwnerID) |
1422 | { | 1421 | { |
1423 | if (ExternalChecks.ExternalChecksPropagatePermissions()) | 1422 | if (ExternalChecks.ExternalChecksPropagatePermissions()) |
@@ -1438,22 +1437,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
1438 | destTaskItem.Name = srcTaskItem.Name; | 1437 | destTaskItem.Name = srcTaskItem.Name; |
1439 | destTaskItem.InvType = srcTaskItem.InvType; | 1438 | destTaskItem.InvType = srcTaskItem.InvType; |
1440 | destTaskItem.Type = srcTaskItem.Type; | 1439 | destTaskItem.Type = srcTaskItem.Type; |
1441 | 1440 | ||
1442 | destPart.AddInventoryItemExclusive(destTaskItem); | 1441 | destPart.AddInventoryItemExclusive(destTaskItem); |
1443 | 1442 | ||
1444 | if (running > 0) | 1443 | if (running > 0) |
1445 | { | 1444 | { |
1446 | destPart.CreateScriptInstance(destTaskItem, 0, false); | 1445 | destPart.CreateScriptInstance(destTaskItem, 0, false); |
1447 | } | 1446 | } |
1448 | 1447 | ||
1449 | ScenePresence avatar; | 1448 | ScenePresence avatar; |
1450 | 1449 | ||
1451 | if (TryGetAvatar(srcTaskItem.OwnerID, out avatar)) | 1450 | if (TryGetAvatar(srcTaskItem.OwnerID, out avatar)) |
1452 | { | 1451 | { |
1453 | destPart.GetProperties(avatar.ControllingClient); | 1452 | destPart.GetProperties(avatar.ControllingClient); |
1454 | } | 1453 | } |
1455 | } | 1454 | } |
1456 | 1455 | ||
1457 | /// <summary> | 1456 | /// <summary> |
1458 | /// Called when an object is removed from the environment into inventory. | 1457 | /// Called when an object is removed from the environment into inventory. |
1459 | /// </summary> | 1458 | /// </summary> |
@@ -1566,7 +1565,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1566 | private bool InventoryDeQueueAndDelete() | 1565 | private bool InventoryDeQueueAndDelete() |
1567 | { | 1566 | { |
1568 | DeleteToInventoryHolder x = null; | 1567 | DeleteToInventoryHolder x = null; |
1569 | 1568 | ||
1570 | try | 1569 | try |
1571 | { | 1570 | { |
1572 | lock (m_inventoryDeletes) | 1571 | lock (m_inventoryDeletes) |
@@ -1580,13 +1579,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1580 | return true; | 1579 | return true; |
1581 | } | 1580 | } |
1582 | } | 1581 | } |
1583 | } | 1582 | } |
1584 | catch(Exception e) | 1583 | catch(Exception e) |
1585 | { | 1584 | { |
1586 | // We can't put the object group details in here since the root part may have disappeared (which is where these sit). | 1585 | // We can't put the object group details in here since the root part may have disappeared (which is where these sit). |
1587 | // FIXME: This needs to be fixed. | 1586 | // FIXME: This needs to be fixed. |
1588 | m_log.ErrorFormat( | 1587 | m_log.ErrorFormat( |
1589 | "[AGENT INVENTORY]: Queued deletion of scene object to agent {0} {1} failed: {2}", | 1588 | "[AGENT INVENTORY]: Queued deletion of scene object to agent {0} {1} failed: {2}", |
1590 | (x != null ? x.remoteClient.Name : "unavailable"), (x != null ? x.remoteClient.AgentId : "unavailable"), e.ToString()); | 1589 | (x != null ? x.remoteClient.Name : "unavailable"), (x != null ? x.remoteClient.AgentId : "unavailable"), e.ToString()); |
1591 | } | 1590 | } |
1592 | 1591 | ||
@@ -1745,7 +1744,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1745 | } | 1744 | } |
1746 | } | 1745 | } |
1747 | } | 1746 | } |
1748 | 1747 | ||
1749 | AssetBase asset = CreateAsset( | 1748 | AssetBase asset = CreateAsset( |
1750 | objectGroup.GetPartName(objectGroup.LocalId), | 1749 | objectGroup.GetPartName(objectGroup.LocalId), |
1751 | objectGroup.GetPartDescription(objectGroup.LocalId), | 1750 | objectGroup.GetPartDescription(objectGroup.LocalId), |
@@ -1792,7 +1791,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1792 | } | 1791 | } |
1793 | } | 1792 | } |
1794 | } | 1793 | } |
1795 | 1794 | ||
1796 | public LLUUID attachObjectAssetStore(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID AgentId) | 1795 | public LLUUID attachObjectAssetStore(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID AgentId) |
1797 | { | 1796 | { |
1798 | SceneObjectGroup objectGroup = grp; | 1797 | SceneObjectGroup objectGroup = grp; |
@@ -2057,7 +2056,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2057 | /// <param name="param"></param> | 2056 | /// <param name="param"></param> |
2058 | /// <returns></returns> | 2057 | /// <returns></returns> |
2059 | public virtual SceneObjectGroup RezObject( | 2058 | public virtual SceneObjectGroup RezObject( |
2060 | SceneObjectPart sourcePart, TaskInventoryItem item, | 2059 | SceneObjectPart sourcePart, TaskInventoryItem item, |
2061 | LLVector3 pos, LLQuaternion rot, LLVector3 vel, int param) | 2060 | LLVector3 pos, LLQuaternion rot, LLVector3 vel, int param) |
2062 | { | 2061 | { |
2063 | // Rez object | 2062 | // Rez object |
@@ -2142,10 +2141,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2142 | return rootPart.ParentGroup; | 2141 | return rootPart.ParentGroup; |
2143 | } | 2142 | } |
2144 | } | 2143 | } |
2145 | 2144 | ||
2146 | return null; | 2145 | return null; |
2147 | } | 2146 | } |
2148 | 2147 | ||
2149 | public virtual bool returnObjects(SceneObjectGroup[] returnobjects, LLUUID AgentId) | 2148 | public virtual bool returnObjects(SceneObjectGroup[] returnobjects, LLUUID AgentId) |
2150 | { | 2149 | { |
2151 | string message = ""; | 2150 | string message = ""; |
@@ -2218,7 +2217,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2218 | item.AssetType = asset.Type; | 2217 | item.AssetType = asset.Type; |
2219 | item.InvType = (int)InventoryType.Object; | 2218 | item.InvType = (int)InventoryType.Object; |
2220 | item.Folder = folderID; | 2219 | item.Folder = folderID; |
2221 | 2220 | ||
2222 | if ((AgentId != returnobjects[i].RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) | 2221 | if ((AgentId != returnobjects[i].RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) |
2223 | { | 2222 | { |
2224 | uint perms = returnobjects[i].GetEffectivePermissions(); | 2223 | uint perms = returnobjects[i].GetEffectivePermissions(); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index e8a8a78..474f062 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -74,11 +74,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
74 | public InnerScene m_innerScene; | 74 | public InnerScene m_innerScene; |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// The last allocated local prim id. When a new local id is requested, the next number in the sequence is | 77 | /// The last allocated local prim id. When a new local id is requested, the next number in the sequence is |
78 | /// dispenced. | 78 | /// dispenced. |
79 | /// </summary> | 79 | /// </summary> |
80 | private uint m_lastAllocatedLocalId = 720000; | 80 | private uint m_lastAllocatedLocalId = 720000; |
81 | 81 | ||
82 | private readonly Mutex _primAllocateMutex = new Mutex(false); | 82 | private readonly Mutex _primAllocateMutex = new Mutex(false); |
83 | 83 | ||
84 | private int m_timePhase = 24; | 84 | private int m_timePhase = 24; |
@@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
607 | public override void Close() | 607 | public override void Close() |
608 | { | 608 | { |
609 | m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName); | 609 | m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName); |
610 | 610 | ||
611 | // Kick all ROOT agents with the message, 'The simulator is going down' | 611 | // Kick all ROOT agents with the message, 'The simulator is going down' |
612 | ForEachScenePresence(delegate(ScenePresence avatar) | 612 | ForEachScenePresence(delegate(ScenePresence avatar) |
613 | { | 613 | { |
@@ -765,7 +765,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
765 | if (m_frame % m_update_backup == 0) | 765 | if (m_frame % m_update_backup == 0) |
766 | { | 766 | { |
767 | UpdateStorageBackup(); | 767 | UpdateStorageBackup(); |
768 | 768 | ||
769 | } | 769 | } |
770 | 770 | ||
771 | if (m_frame % m_update_terrain == 0) | 771 | if (m_frame % m_update_terrain == 0) |
@@ -1112,7 +1112,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1112 | //X | 1112 | //X |
1113 | // . | 1113 | // . |
1114 | // | 1114 | // |
1115 | // Shade the terrain for shadows | 1115 | // Shade the terrain for shadows |
1116 | if ((x - 1 > 0) && (y - 1 > 0)) | 1116 | if ((x - 1 > 0) && (y - 1 > 0)) |
1117 | { | 1117 | { |
1118 | hfvalue = (float)hm[x, y]; | 1118 | hfvalue = (float)hm[x, y]; |
@@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1133 | else if (hfdiff < -0.3f) | 1133 | else if (hfdiff < -0.3f) |
1134 | { | 1134 | { |
1135 | // We have to desaturate and blacken the land at the same time | 1135 | // We have to desaturate and blacken the land at the same time |
1136 | // we use floats, colors use bytes, so shrink are space down to | 1136 | // we use floats, colors use bytes, so shrink are space down to |
1137 | // 0-255 | 1137 | // 0-255 |
1138 | 1138 | ||
1139 | 1139 | ||
@@ -1429,13 +1429,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1429 | public void LazySaveGeneratedMaptile(byte[] data, bool temporary) | 1429 | public void LazySaveGeneratedMaptile(byte[] data, bool temporary) |
1430 | { | 1430 | { |
1431 | // Overwrites the local Asset cache with new maptile data | 1431 | // Overwrites the local Asset cache with new maptile data |
1432 | // Assets are single write, this causes the asset server to ignore this update, | 1432 | // Assets are single write, this causes the asset server to ignore this update, |
1433 | // but the local asset cache does not | 1433 | // but the local asset cache does not |
1434 | 1434 | ||
1435 | // this is on purpose! The net result of this is the region always has the most up to date | 1435 | // this is on purpose! The net result of this is the region always has the most up to date |
1436 | // map tile while protecting the (grid) asset database from bloat caused by a new asset each | 1436 | // map tile while protecting the (grid) asset database from bloat caused by a new asset each |
1437 | // time a mapimage is generated! | 1437 | // time a mapimage is generated! |
1438 | 1438 | ||
1439 | LLUUID lastMapRegionUUID = m_regInfo.lastMapUUID; | 1439 | LLUUID lastMapRegionUUID = m_regInfo.lastMapUUID; |
1440 | 1440 | ||
1441 | int lastMapRefresh = 0; | 1441 | int lastMapRefresh = 0; |
@@ -1711,7 +1711,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1711 | /// </param> | 1711 | /// </param> |
1712 | /// <returns> | 1712 | /// <returns> |
1713 | /// true if the object was added, false if an object with the same uuid was already in the scene | 1713 | /// true if the object was added, false if an object with the same uuid was already in the scene |
1714 | /// </returns> | 1714 | /// </returns> |
1715 | public bool AddRestoredSceneObject( | 1715 | public bool AddRestoredSceneObject( |
1716 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | 1716 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) |
1717 | { | 1717 | { |
@@ -1739,15 +1739,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
1739 | lock (Entities) | 1739 | lock (Entities) |
1740 | { | 1740 | { |
1741 | ICollection<EntityBase> entities = new List<EntityBase>(Entities.Values); | 1741 | ICollection<EntityBase> entities = new List<EntityBase>(Entities.Values); |
1742 | 1742 | ||
1743 | foreach (EntityBase e in entities) | 1743 | foreach (EntityBase e in entities) |
1744 | { | 1744 | { |
1745 | if (e is SceneObjectGroup) | 1745 | if (e is SceneObjectGroup) |
1746 | DeleteSceneObject((SceneObjectGroup)e); | 1746 | DeleteSceneObject((SceneObjectGroup)e); |
1747 | } | 1747 | } |
1748 | } | 1748 | } |
1749 | } | 1749 | } |
1750 | 1750 | ||
1751 | /// <summary> | 1751 | /// <summary> |
1752 | /// Delete the given object from the scene. | 1752 | /// Delete the given object from the scene. |
1753 | /// </summary> | 1753 | /// </summary> |
@@ -1791,8 +1791,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1791 | 1791 | ||
1792 | public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset) | 1792 | public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset) |
1793 | { | 1793 | { |
1794 | m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName); | 1794 | m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName); |
1795 | 1795 | ||
1796 | m_serialiser.LoadPrimsFromXml(this, fileName, newIdsFlag, loadOffset); | 1796 | m_serialiser.LoadPrimsFromXml(this, fileName, newIdsFlag, loadOffset); |
1797 | } | 1797 | } |
1798 | 1798 | ||
@@ -1805,29 +1805,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
1805 | 1805 | ||
1806 | public void LoadPrimsFromXml2(string fileName) | 1806 | public void LoadPrimsFromXml2(string fileName) |
1807 | { | 1807 | { |
1808 | m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from {1}", RegionInfo.RegionName, fileName); | 1808 | m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from {1}", RegionInfo.RegionName, fileName); |
1809 | 1809 | ||
1810 | m_serialiser.LoadPrimsFromXml2(this, fileName); | 1810 | m_serialiser.LoadPrimsFromXml2(this, fileName); |
1811 | } | 1811 | } |
1812 | 1812 | ||
1813 | public void LoadPrimsFromXml2(TextReader reader, bool startScripts) | 1813 | public void LoadPrimsFromXml2(TextReader reader, bool startScripts) |
1814 | { | 1814 | { |
1815 | m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from stream", RegionInfo.RegionName); | 1815 | m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from stream", RegionInfo.RegionName); |
1816 | 1816 | ||
1817 | m_serialiser.LoadPrimsFromXml2(this, reader, startScripts); | 1817 | m_serialiser.LoadPrimsFromXml2(this, reader, startScripts); |
1818 | } | 1818 | } |
1819 | 1819 | ||
1820 | public void SavePrimsToXml2(string fileName) | 1820 | public void SavePrimsToXml2(string fileName) |
1821 | { | 1821 | { |
1822 | m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to {1}", RegionInfo.RegionName, fileName); | 1822 | m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to {1}", RegionInfo.RegionName, fileName); |
1823 | 1823 | ||
1824 | m_serialiser.SavePrimsToXml2(this, fileName); | 1824 | m_serialiser.SavePrimsToXml2(this, fileName); |
1825 | } | 1825 | } |
1826 | 1826 | ||
1827 | public void SavePrimsToXml2(TextWriter stream, LLVector3 min, LLVector3 max) | 1827 | public void SavePrimsToXml2(TextWriter stream, LLVector3 min, LLVector3 max) |
1828 | { | 1828 | { |
1829 | m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to stream", RegionInfo.RegionName); | 1829 | m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to stream", RegionInfo.RegionName); |
1830 | 1830 | ||
1831 | m_serialiser.SavePrimsToXml2(this, stream, min, max); | 1831 | m_serialiser.SavePrimsToXml2(this, stream, min, max); |
1832 | } | 1832 | } |
1833 | 1833 | ||
@@ -1835,7 +1835,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1835 | { | 1835 | { |
1836 | m_log.InfoFormat( | 1836 | m_log.InfoFormat( |
1837 | "[SCENE]: Saving prims with name {0} in xml2 format for region {1} to {2}", primName, RegionInfo.RegionName, fileName); | 1837 | "[SCENE]: Saving prims with name {0} in xml2 format for region {1} to {2}", primName, RegionInfo.RegionName, fileName); |
1838 | 1838 | ||
1839 | List<EntityBase> entityList = GetEntities(); | 1839 | List<EntityBase> entityList = GetEntities(); |
1840 | List<EntityBase> primList = new List<EntityBase>(); | 1840 | List<EntityBase> primList = new List<EntityBase>(); |
1841 | 1841 | ||
@@ -1860,7 +1860,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1860 | public void LoadPrimsFromArchive(string filePath) | 1860 | public void LoadPrimsFromArchive(string filePath) |
1861 | { | 1861 | { |
1862 | m_log.InfoFormat("[SCENE]: Loading archive to region {0} from {1}", RegionInfo.RegionName, filePath); | 1862 | m_log.InfoFormat("[SCENE]: Loading archive to region {0} from {1}", RegionInfo.RegionName, filePath); |
1863 | 1863 | ||
1864 | m_archiver.DearchiveRegion(filePath); | 1864 | m_archiver.DearchiveRegion(filePath); |
1865 | } | 1865 | } |
1866 | 1866 | ||
@@ -1871,7 +1871,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1871 | public void SavePrimsToArchive(string filePath) | 1871 | public void SavePrimsToArchive(string filePath) |
1872 | { | 1872 | { |
1873 | m_log.InfoFormat("[SCENE]: Writing archive for region {0} to {1}", RegionInfo.RegionName, filePath); | 1873 | m_log.InfoFormat("[SCENE]: Writing archive for region {0} to {1}", RegionInfo.RegionName, filePath); |
1874 | 1874 | ||
1875 | m_archiver.ArchiveRegion(filePath); | 1875 | m_archiver.ArchiveRegion(filePath); |
1876 | } | 1876 | } |
1877 | 1877 | ||
@@ -1986,7 +1986,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1986 | m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); | 1986 | m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); |
1987 | if (XMLMethod == 0) | 1987 | if (XMLMethod == 0) |
1988 | { | 1988 | { |
1989 | SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); | 1989 | SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); |
1990 | AddRestoredSceneObject(sceneObject, true, false); | 1990 | AddRestoredSceneObject(sceneObject, true, false); |
1991 | 1991 | ||
1992 | SceneObjectPart RootPrim = GetSceneObjectPart(primID); | 1992 | SceneObjectPart RootPrim = GetSceneObjectPart(primID); |
@@ -1999,7 +1999,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1999 | { | 1999 | { |
2000 | DeleteSceneObject(grp); | 2000 | DeleteSceneObject(grp); |
2001 | } | 2001 | } |
2002 | 2002 | ||
2003 | m_log.Info("[INTERREGION]: Denied prim crossing for banned avatar"); | 2003 | m_log.Info("[INTERREGION]: Denied prim crossing for banned avatar"); |
2004 | 2004 | ||
2005 | return false; | 2005 | return false; |
@@ -2075,7 +2075,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2075 | else | 2075 | else |
2076 | { | 2076 | { |
2077 | m_log.DebugFormat( | 2077 | m_log.DebugFormat( |
2078 | "[SCENE]: Adding new {0} agent {1} {2} in {3}", | 2078 | "[SCENE]: Adding new {0} agent {1} {2} in {3}", |
2079 | (child ? "child" : "root"), client.Name, client.AgentId, RegionInfo.RegionName); | 2079 | (child ? "child" : "root"), client.Name, client.AgentId, RegionInfo.RegionName); |
2080 | 2080 | ||
2081 | CommsManager.UserProfileCacheService.AddNewUser(client.AgentId); | 2081 | CommsManager.UserProfileCacheService.AddNewUser(client.AgentId); |
@@ -2156,7 +2156,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2156 | client.OnScriptReset += ProcessScriptReset; | 2156 | client.OnScriptReset += ProcessScriptReset; |
2157 | client.OnGetScriptRunning += GetScriptRunning; | 2157 | client.OnGetScriptRunning += GetScriptRunning; |
2158 | client.OnSetScriptRunning += SetScriptRunning; | 2158 | client.OnSetScriptRunning += SetScriptRunning; |
2159 | 2159 | ||
2160 | client.OnRegionHandleRequest += RegionHandleRequest; | 2160 | client.OnRegionHandleRequest += RegionHandleRequest; |
2161 | 2161 | ||
2162 | client.OnUnackedTerrain += TerrainUnAcked; | 2162 | client.OnUnackedTerrain += TerrainUnAcked; |
@@ -2310,7 +2310,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2310 | public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) | 2310 | public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) |
2311 | { | 2311 | { |
2312 | appearance = null; // VS needs this line, mono doesn't | 2312 | appearance = null; // VS needs this line, mono doesn't |
2313 | 2313 | ||
2314 | try | 2314 | try |
2315 | { | 2315 | { |
2316 | if (m_AvatarFactory == null || | 2316 | if (m_AvatarFactory == null || |
@@ -2323,10 +2323,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2323 | catch (Exception e) | 2323 | catch (Exception e) |
2324 | { | 2324 | { |
2325 | m_log.ErrorFormat( | 2325 | m_log.ErrorFormat( |
2326 | "[APPERANCE]: Problem when fetching appearance for avatar {0}, {1}, using default. {2}", | 2326 | "[APPERANCE]: Problem when fetching appearance for avatar {0}, {1}, using default. {2}", |
2327 | client.Name, client.AgentId, e); | 2327 | client.Name, client.AgentId, e); |
2328 | appearance = new AvatarAppearance(); | 2328 | appearance = new AvatarAppearance(); |
2329 | } | 2329 | } |
2330 | } | 2330 | } |
2331 | 2331 | ||
2332 | /// <summary> | 2332 | /// <summary> |
@@ -2341,13 +2341,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
2341 | { | 2341 | { |
2342 | childagentYN = avatar.IsChildAgent; | 2342 | childagentYN = avatar.IsChildAgent; |
2343 | } | 2343 | } |
2344 | 2344 | ||
2345 | try | 2345 | try |
2346 | { | 2346 | { |
2347 | m_log.DebugFormat( | 2347 | m_log.DebugFormat( |
2348 | "[SCENE]: Removing {0} agent {1} from region {2}", | 2348 | "[SCENE]: Removing {0} agent {1} from region {2}", |
2349 | (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName); | 2349 | (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName); |
2350 | 2350 | ||
2351 | if (avatar.IsChildAgent) | 2351 | if (avatar.IsChildAgent) |
2352 | { | 2352 | { |
2353 | m_innerScene.removeUserCount(false); | 2353 | m_innerScene.removeUserCount(false); |
@@ -2378,7 +2378,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2378 | // We don't know which count to remove it from | 2378 | // We don't know which count to remove it from |
2379 | // Avatar is already disposed :/ | 2379 | // Avatar is already disposed :/ |
2380 | } | 2380 | } |
2381 | 2381 | ||
2382 | m_eventManager.TriggerOnRemovePresence(agentID); | 2382 | m_eventManager.TriggerOnRemovePresence(agentID); |
2383 | Broadcast(delegate(IClientAPI client) | 2383 | Broadcast(delegate(IClientAPI client) |
2384 | { | 2384 | { |
@@ -2717,7 +2717,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2717 | { | 2717 | { |
2718 | m_innerScene.removeUserCount(true); | 2718 | m_innerScene.removeUserCount(true); |
2719 | } | 2719 | } |
2720 | 2720 | ||
2721 | // Tell a single agent to disconnect from the region. | 2721 | // Tell a single agent to disconnect from the region. |
2722 | presence.ControllingClient.SendShutdownConnectionNotice(); | 2722 | presence.ControllingClient.SendShutdownConnectionNotice(); |
2723 | 2723 | ||
@@ -3827,9 +3827,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
3827 | { | 3827 | { |
3828 | //should be doing this by parcel, but as its only for testing | 3828 | //should be doing this by parcel, but as its only for testing |
3829 | // The use of Thread.Sleep here causes the following compiler error under mono 1.2.4 | 3829 | // The use of Thread.Sleep here causes the following compiler error under mono 1.2.4 |
3830 | // OpenSim/Region/Environment/Scenes/Scene.cs(3675,17): error CS0103: The name `Thread' does not exist | 3830 | // OpenSim/Region/Environment/Scenes/Scene.cs(3675,17): error CS0103: The name `Thread' does not exist |
3831 | // in the context of `<>c__CompilerGenerated17' | 3831 | // in the context of `<>c__CompilerGenerated17' |
3832 | // MW said it was okay to comment the body of this method out for now since the code is experimental | 3832 | // MW said it was okay to comment the body of this method out for now since the code is experimental |
3833 | // and will be replaced anyway | 3833 | // and will be replaced anyway |
3834 | // ForEachClient(delegate(IClientAPI client) | 3834 | // ForEachClient(delegate(IClientAPI client) |
3835 | // { | 3835 | // { |
@@ -3840,7 +3840,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3840 | // client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); | 3840 | // client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); |
3841 | // }); | 3841 | // }); |
3842 | } | 3842 | } |
3843 | 3843 | ||
3844 | public void RegionHandleRequest(IClientAPI client, LLUUID regionID) | 3844 | public void RegionHandleRequest(IClientAPI client, LLUUID regionID) |
3845 | { | 3845 | { |
3846 | RegionInfo info; | 3846 | RegionInfo info; |
@@ -3860,4 +3860,4 @@ namespace OpenSim.Region.Environment.Scenes | |||
3860 | client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); | 3860 | client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); |
3861 | } | 3861 | } |
3862 | } | 3862 | } |
3863 | } | 3863 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 35a7434..adad7d3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
60 | public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; | 60 | public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; |
61 | public event LogOffUser OnLogOffUser; | 61 | public event LogOffUser OnLogOffUser; |
62 | public event GetLandData OnGetLandData; | 62 | public event GetLandData OnGetLandData; |
63 | 63 | ||
64 | private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; | 64 | private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; |
65 | private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser; | 65 | private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser; |
66 | private ExpectPrimDelegate handlerExpectPrim = null; // OnExpectPrim; | 66 | private ExpectPrimDelegate handlerExpectPrim = null; // OnExpectPrim; |
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
70 | private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate; | 70 | private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate; |
71 | private RemoveKnownRegionsFromAvatarList handlerRemoveKnownRegionFromAvatar = null; // OnRemoveKnownRegionFromAvatar; | 71 | private RemoveKnownRegionsFromAvatarList handlerRemoveKnownRegionFromAvatar = null; // OnRemoveKnownRegionFromAvatar; |
72 | private LogOffUser handlerLogOffUser = null; | 72 | private LogOffUser handlerLogOffUser = null; |
73 | private GetLandData handlerGetLandData = null; // OnGetLandData | 73 | private GetLandData handlerGetLandData = null; // OnGetLandData |
74 | 74 | ||
75 | public KillObjectDelegate KillObject; | 75 | public KillObjectDelegate KillObject; |
76 | public string _debugRegionName = String.Empty; | 76 | public string _debugRegionName = String.Empty; |
@@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
240 | } | 240 | } |
241 | return null; | 241 | return null; |
242 | } | 242 | } |
243 | 243 | ||
244 | #endregion | 244 | #endregion |
245 | 245 | ||
246 | #region Inform Client of Neighbours | 246 | #region Inform Client of Neighbours |
@@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
582 | LLVector3 lookAt, uint flags) | 582 | LLVector3 lookAt, uint flags) |
583 | { | 583 | { |
584 | bool destRegionUp = false; | 584 | bool destRegionUp = false; |
585 | 585 | ||
586 | if (regionHandle == m_regionInfo.RegionHandle) | 586 | if (regionHandle == m_regionInfo.RegionHandle) |
587 | { | 587 | { |
588 | // Teleport within the same region | 588 | // Teleport within the same region |
diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs index 0b2cc9e..a0e0a37 100644 --- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs +++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -45,534 +45,553 @@ namespace OpenSim.Region.Environment.Scenes | |||
45 | 45 | ||
46 | #region Object Permission Checks | 46 | #region Object Permission Checks |
47 | 47 | ||
48 | public delegate uint GenerateClientFlags(LLUUID userID, LLUUID objectIDID); | 48 | public delegate uint GenerateClientFlags(LLUUID userID, LLUUID objectIDID); |
49 | private List<GenerateClientFlags> GenerateClientFlagsCheckFunctions = new List<GenerateClientFlags>(); | 49 | private List<GenerateClientFlags> GenerateClientFlagsCheckFunctions = new List<GenerateClientFlags>(); |
50 | 50 | ||
51 | public void addGenerateClientFlags(GenerateClientFlags delegateFunc) | 51 | public void addGenerateClientFlags(GenerateClientFlags delegateFunc) |
52 | { | 52 | { |
53 | if (!GenerateClientFlagsCheckFunctions.Contains(delegateFunc)) | 53 | if (!GenerateClientFlagsCheckFunctions.Contains(delegateFunc)) |
54 | GenerateClientFlagsCheckFunctions.Add(delegateFunc); | 54 | GenerateClientFlagsCheckFunctions.Add(delegateFunc); |
55 | } | 55 | } |
56 | public void removeGenerateClientFlags(GenerateClientFlags delegateFunc) | ||
57 | { | ||
58 | if (GenerateClientFlagsCheckFunctions.Contains(delegateFunc)) | ||
59 | GenerateClientFlagsCheckFunctions.Remove(delegateFunc); | ||
60 | } | ||
61 | 56 | ||
62 | public uint ExternalChecksGenerateClientFlags(LLUUID userID, LLUUID objectID) | 57 | public void removeGenerateClientFlags(GenerateClientFlags delegateFunc) |
63 | { | 58 | { |
64 | SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); | 59 | if (GenerateClientFlagsCheckFunctions.Contains(delegateFunc)) |
65 | 60 | GenerateClientFlagsCheckFunctions.Remove(delegateFunc); | |
66 | if (part == null) | 61 | } |
67 | return 0; | ||
68 | |||
69 | uint perms=part.GetEffectiveObjectFlags() | | ||
70 | (uint)LLObject.ObjectFlags.ObjectModify | | ||
71 | (uint)LLObject.ObjectFlags.ObjectCopy | | ||
72 | (uint)LLObject.ObjectFlags.ObjectMove | | ||
73 | (uint)LLObject.ObjectFlags.ObjectTransfer | | ||
74 | (uint)LLObject.ObjectFlags.ObjectYouOwner | | ||
75 | (uint)LLObject.ObjectFlags.ObjectAnyOwner | | ||
76 | (uint)LLObject.ObjectFlags.ObjectOwnerModify | | ||
77 | (uint)LLObject.ObjectFlags.ObjectYouOfficer; | ||
78 | |||
79 | foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) | ||
80 | { | ||
81 | perms &= check(userID, objectID); | ||
82 | } | ||
83 | return perms; | ||
84 | } | ||
85 | 62 | ||
86 | public delegate void SetBypassPermissions(bool value); | 63 | public uint ExternalChecksGenerateClientFlags(LLUUID userID, LLUUID objectID) |
87 | private List<SetBypassPermissions> SetBypassPermissionsCheckFunctions = new List<SetBypassPermissions>(); | 64 | { |
65 | SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); | ||
88 | 66 | ||
89 | public void addSetBypassPermissions(SetBypassPermissions delegateFunc) | 67 | if (part == null) |
90 | { | 68 | return 0; |
91 | if (!SetBypassPermissionsCheckFunctions.Contains(delegateFunc)) | ||
92 | SetBypassPermissionsCheckFunctions.Add(delegateFunc); | ||
93 | } | ||
94 | public void removeSetBypassPermissions(SetBypassPermissions delegateFunc) | ||
95 | { | ||
96 | if (SetBypassPermissionsCheckFunctions.Contains(delegateFunc)) | ||
97 | SetBypassPermissionsCheckFunctions.Remove(delegateFunc); | ||
98 | } | ||
99 | 69 | ||
100 | public void ExternalChecksSetBypassPermissions(bool value) | 70 | uint perms=part.GetEffectiveObjectFlags() | |
71 | (uint)LLObject.ObjectFlags.ObjectModify | | ||
72 | (uint)LLObject.ObjectFlags.ObjectCopy | | ||
73 | (uint)LLObject.ObjectFlags.ObjectMove | | ||
74 | (uint)LLObject.ObjectFlags.ObjectTransfer | | ||
75 | (uint)LLObject.ObjectFlags.ObjectYouOwner | | ||
76 | (uint)LLObject.ObjectFlags.ObjectAnyOwner | | ||
77 | (uint)LLObject.ObjectFlags.ObjectOwnerModify | | ||
78 | (uint)LLObject.ObjectFlags.ObjectYouOfficer; | ||
79 | |||
80 | foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) | ||
101 | { | 81 | { |
102 | foreach (SetBypassPermissions check in SetBypassPermissionsCheckFunctions) | 82 | perms &= check(userID, objectID); |
103 | { | ||
104 | check(value); | ||
105 | } | ||
106 | } | 83 | } |
84 | return perms; | ||
85 | } | ||
107 | 86 | ||
108 | public delegate bool BypassPermissions(); | 87 | public delegate void SetBypassPermissions(bool value); |
109 | private List<BypassPermissions> BypassPermissionsCheckFunctions = new List<BypassPermissions>(); | 88 | private List<SetBypassPermissions> SetBypassPermissionsCheckFunctions = new List<SetBypassPermissions>(); |
110 | 89 | ||
111 | public void addBypassPermissions(BypassPermissions delegateFunc) | 90 | public void addSetBypassPermissions(SetBypassPermissions delegateFunc) |
112 | { | 91 | { |
113 | if (!BypassPermissionsCheckFunctions.Contains(delegateFunc)) | 92 | if (!SetBypassPermissionsCheckFunctions.Contains(delegateFunc)) |
114 | BypassPermissionsCheckFunctions.Add(delegateFunc); | 93 | SetBypassPermissionsCheckFunctions.Add(delegateFunc); |
115 | } | 94 | } |
116 | public void removeBypassPermissions(BypassPermissions delegateFunc) | 95 | |
96 | public void removeSetBypassPermissions(SetBypassPermissions delegateFunc) | ||
97 | { | ||
98 | if (SetBypassPermissionsCheckFunctions.Contains(delegateFunc)) | ||
99 | SetBypassPermissionsCheckFunctions.Remove(delegateFunc); | ||
100 | } | ||
101 | |||
102 | public void ExternalChecksSetBypassPermissions(bool value) | ||
103 | { | ||
104 | foreach (SetBypassPermissions check in SetBypassPermissionsCheckFunctions) | ||
117 | { | 105 | { |
118 | if (BypassPermissionsCheckFunctions.Contains(delegateFunc)) | 106 | check(value); |
119 | BypassPermissionsCheckFunctions.Remove(delegateFunc); | ||
120 | } | 107 | } |
108 | } | ||
121 | 109 | ||
122 | public bool ExternalChecksBypassPermissions() | 110 | public delegate bool BypassPermissions(); |
111 | private List<BypassPermissions> BypassPermissionsCheckFunctions = new List<BypassPermissions>(); | ||
112 | |||
113 | public void addBypassPermissions(BypassPermissions delegateFunc) | ||
114 | { | ||
115 | if (!BypassPermissionsCheckFunctions.Contains(delegateFunc)) | ||
116 | BypassPermissionsCheckFunctions.Add(delegateFunc); | ||
117 | } | ||
118 | |||
119 | public void removeBypassPermissions(BypassPermissions delegateFunc) | ||
120 | { | ||
121 | if (BypassPermissionsCheckFunctions.Contains(delegateFunc)) | ||
122 | BypassPermissionsCheckFunctions.Remove(delegateFunc); | ||
123 | } | ||
124 | |||
125 | public bool ExternalChecksBypassPermissions() | ||
126 | { | ||
127 | foreach (BypassPermissions check in BypassPermissionsCheckFunctions) | ||
123 | { | 128 | { |
124 | foreach (BypassPermissions check in BypassPermissionsCheckFunctions) | 129 | if (check() == false) |
125 | { | 130 | { |
126 | if (check() == false) | 131 | return false; |
127 | { | ||
128 | return false; | ||
129 | } | ||
130 | } | 132 | } |
131 | return true; | ||
132 | } | 133 | } |
134 | return true; | ||
135 | } | ||
133 | 136 | ||
134 | public delegate bool PropagatePermissions(); | 137 | public delegate bool PropagatePermissions(); |
135 | private List<PropagatePermissions> PropagatePermissionsCheckFunctions = new List<PropagatePermissions>(); | 138 | private List<PropagatePermissions> PropagatePermissionsCheckFunctions = new List<PropagatePermissions>(); |
136 | 139 | ||
137 | public void addPropagatePermissions(PropagatePermissions delegateFunc) | 140 | public void addPropagatePermissions(PropagatePermissions delegateFunc) |
138 | { | 141 | { |
139 | if (!PropagatePermissionsCheckFunctions.Contains(delegateFunc)) | 142 | if (!PropagatePermissionsCheckFunctions.Contains(delegateFunc)) |
140 | PropagatePermissionsCheckFunctions.Add(delegateFunc); | 143 | PropagatePermissionsCheckFunctions.Add(delegateFunc); |
141 | } | 144 | } |
142 | public void removePropagatePermissions(PropagatePermissions delegateFunc) | ||
143 | { | ||
144 | if (PropagatePermissionsCheckFunctions.Contains(delegateFunc)) | ||
145 | PropagatePermissionsCheckFunctions.Remove(delegateFunc); | ||
146 | } | ||
147 | 145 | ||
148 | public bool ExternalChecksPropagatePermissions() | 146 | public void removePropagatePermissions(PropagatePermissions delegateFunc) |
147 | { | ||
148 | if (PropagatePermissionsCheckFunctions.Contains(delegateFunc)) | ||
149 | PropagatePermissionsCheckFunctions.Remove(delegateFunc); | ||
150 | } | ||
151 | |||
152 | public bool ExternalChecksPropagatePermissions() | ||
153 | { | ||
154 | foreach (PropagatePermissions check in PropagatePermissionsCheckFunctions) | ||
149 | { | 155 | { |
150 | foreach (PropagatePermissions check in PropagatePermissionsCheckFunctions) | 156 | if (check() == false) |
151 | { | 157 | { |
152 | if (check() == false) | 158 | return false; |
153 | { | ||
154 | return false; | ||
155 | } | ||
156 | } | 159 | } |
157 | return true; | ||
158 | } | 160 | } |
161 | return true; | ||
162 | } | ||
159 | 163 | ||
160 | #region REZ OBJECT | 164 | #region REZ OBJECT |
161 | public delegate bool CanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition, Scene scene); | 165 | public delegate bool CanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition, Scene scene); |
162 | private List<CanRezObject> CanRezObjectCheckFunctions = new List<CanRezObject>(); | 166 | private List<CanRezObject> CanRezObjectCheckFunctions = new List<CanRezObject>(); |
163 | 167 | ||
164 | public void addCheckRezObject(CanRezObject delegateFunc) | 168 | public void addCheckRezObject(CanRezObject delegateFunc) |
165 | { | 169 | { |
166 | if (!CanRezObjectCheckFunctions.Contains(delegateFunc)) | 170 | if (!CanRezObjectCheckFunctions.Contains(delegateFunc)) |
167 | CanRezObjectCheckFunctions.Add(delegateFunc); | 171 | CanRezObjectCheckFunctions.Add(delegateFunc); |
168 | } | 172 | } |
169 | public void removeCheckRezObject(CanRezObject delegateFunc) | ||
170 | { | ||
171 | if (CanRezObjectCheckFunctions.Contains(delegateFunc)) | ||
172 | CanRezObjectCheckFunctions.Remove(delegateFunc); | ||
173 | } | ||
174 | 173 | ||
175 | public bool ExternalChecksCanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition) | 174 | public void removeCheckRezObject(CanRezObject delegateFunc) |
175 | { | ||
176 | if (CanRezObjectCheckFunctions.Contains(delegateFunc)) | ||
177 | CanRezObjectCheckFunctions.Remove(delegateFunc); | ||
178 | } | ||
179 | |||
180 | public bool ExternalChecksCanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition) | ||
181 | { | ||
182 | foreach (CanRezObject check in CanRezObjectCheckFunctions) | ||
176 | { | 183 | { |
177 | foreach (CanRezObject check in CanRezObjectCheckFunctions) | 184 | if (check(objectCount, owner,objectPosition, m_scene) == false) |
178 | { | 185 | { |
179 | if (check(objectCount, owner,objectPosition, m_scene) == false) | 186 | return false; |
180 | { | ||
181 | return false; | ||
182 | } | ||
183 | } | 187 | } |
184 | return true; | ||
185 | } | 188 | } |
189 | return true; | ||
190 | } | ||
186 | 191 | ||
187 | #endregion | 192 | #endregion |
188 | 193 | ||
189 | #region DELETE OBJECT | 194 | #region DELETE OBJECT |
190 | public delegate bool CanDeleteObject(LLUUID objectID, LLUUID deleter, Scene scene); | 195 | public delegate bool CanDeleteObject(LLUUID objectID, LLUUID deleter, Scene scene); |
191 | private List<CanDeleteObject> CanDeleteObjectCheckFunctions = new List<CanDeleteObject>(); | 196 | private List<CanDeleteObject> CanDeleteObjectCheckFunctions = new List<CanDeleteObject>(); |
192 | 197 | ||
193 | public void addCheckDeleteObject(CanDeleteObject delegateFunc) | 198 | public void addCheckDeleteObject(CanDeleteObject delegateFunc) |
194 | { | 199 | { |
195 | if (!CanDeleteObjectCheckFunctions.Contains(delegateFunc)) | 200 | if (!CanDeleteObjectCheckFunctions.Contains(delegateFunc)) |
196 | CanDeleteObjectCheckFunctions.Add(delegateFunc); | 201 | CanDeleteObjectCheckFunctions.Add(delegateFunc); |
197 | } | 202 | } |
198 | public void removeCheckDeleteObject(CanDeleteObject delegateFunc) | ||
199 | { | ||
200 | if (CanDeleteObjectCheckFunctions.Contains(delegateFunc)) | ||
201 | CanDeleteObjectCheckFunctions.Remove(delegateFunc); | ||
202 | } | ||
203 | 203 | ||
204 | public bool ExternalChecksCanDeleteObject(LLUUID objectID, LLUUID deleter) | 204 | public void removeCheckDeleteObject(CanDeleteObject delegateFunc) |
205 | { | ||
206 | if (CanDeleteObjectCheckFunctions.Contains(delegateFunc)) | ||
207 | CanDeleteObjectCheckFunctions.Remove(delegateFunc); | ||
208 | } | ||
209 | |||
210 | public bool ExternalChecksCanDeleteObject(LLUUID objectID, LLUUID deleter) | ||
211 | { | ||
212 | foreach (CanDeleteObject check in CanDeleteObjectCheckFunctions) | ||
205 | { | 213 | { |
206 | foreach (CanDeleteObject check in CanDeleteObjectCheckFunctions) | 214 | if (check(objectID,deleter,m_scene) == false) |
207 | { | 215 | { |
208 | if (check(objectID,deleter,m_scene) == false) | 216 | return false; |
209 | { | ||
210 | return false; | ||
211 | } | ||
212 | } | 217 | } |
213 | return true; | ||
214 | } | 218 | } |
219 | return true; | ||
220 | } | ||
215 | 221 | ||
216 | #endregion | 222 | #endregion |
217 | 223 | ||
218 | #region TAKE OBJECT | 224 | #region TAKE OBJECT |
219 | public delegate bool CanTakeObject(LLUUID objectID, LLUUID stealer, Scene scene); | 225 | public delegate bool CanTakeObject(LLUUID objectID, LLUUID stealer, Scene scene); |
220 | private List<CanTakeObject> CanTakeObjectCheckFunctions = new List<CanTakeObject>(); | 226 | private List<CanTakeObject> CanTakeObjectCheckFunctions = new List<CanTakeObject>(); |
221 | 227 | ||
222 | public void addCheckTakeObject(CanTakeObject delegateFunc) | 228 | public void addCheckTakeObject(CanTakeObject delegateFunc) |
223 | { | 229 | { |
224 | if (!CanTakeObjectCheckFunctions.Contains(delegateFunc)) | 230 | if (!CanTakeObjectCheckFunctions.Contains(delegateFunc)) |
225 | CanTakeObjectCheckFunctions.Add(delegateFunc); | 231 | CanTakeObjectCheckFunctions.Add(delegateFunc); |
226 | } | 232 | } |
227 | public void removeCheckTakeObject(CanTakeObject delegateFunc) | ||
228 | { | ||
229 | if (CanTakeObjectCheckFunctions.Contains(delegateFunc)) | ||
230 | CanTakeObjectCheckFunctions.Remove(delegateFunc); | ||
231 | } | ||
232 | 233 | ||
233 | public bool ExternalChecksCanTakeObject(LLUUID objectID, LLUUID AvatarTakingUUID) | 234 | public void removeCheckTakeObject(CanTakeObject delegateFunc) |
235 | { | ||
236 | if (CanTakeObjectCheckFunctions.Contains(delegateFunc)) | ||
237 | CanTakeObjectCheckFunctions.Remove(delegateFunc); | ||
238 | } | ||
239 | |||
240 | public bool ExternalChecksCanTakeObject(LLUUID objectID, LLUUID AvatarTakingUUID) | ||
241 | { | ||
242 | foreach (CanTakeObject check in CanTakeObjectCheckFunctions) | ||
234 | { | 243 | { |
235 | foreach (CanTakeObject check in CanTakeObjectCheckFunctions) | 244 | if (check(objectID, AvatarTakingUUID, m_scene) == false) |
236 | { | 245 | { |
237 | if (check(objectID, AvatarTakingUUID, m_scene) == false) | 246 | return false; |
238 | { | ||
239 | return false; | ||
240 | } | ||
241 | } | 247 | } |
242 | return true; | ||
243 | } | 248 | } |
249 | return true; | ||
250 | } | ||
244 | 251 | ||
245 | #endregion | 252 | #endregion |
246 | 253 | ||
247 | #region TAKE COPY OBJECT | 254 | #region TAKE COPY OBJECT |
248 | public delegate bool CanTakeCopyObject(LLUUID objectID, LLUUID userID, Scene inScene); | 255 | public delegate bool CanTakeCopyObject(LLUUID objectID, LLUUID userID, Scene inScene); |
249 | private List<CanTakeCopyObject> CanTakeCopyObjectCheckFunctions = new List<CanTakeCopyObject>(); | 256 | private List<CanTakeCopyObject> CanTakeCopyObjectCheckFunctions = new List<CanTakeCopyObject>(); |
250 | 257 | ||
251 | public void addCheckTakeCopyObject(CanTakeCopyObject delegateFunc) | 258 | public void addCheckTakeCopyObject(CanTakeCopyObject delegateFunc) |
252 | { | 259 | { |
253 | if (!CanTakeCopyObjectCheckFunctions.Contains(delegateFunc)) | 260 | if (!CanTakeCopyObjectCheckFunctions.Contains(delegateFunc)) |
254 | CanTakeCopyObjectCheckFunctions.Add(delegateFunc); | 261 | CanTakeCopyObjectCheckFunctions.Add(delegateFunc); |
255 | } | 262 | } |
256 | public void removeCheckTakeCopyObject(CanTakeCopyObject delegateFunc) | ||
257 | { | ||
258 | if (CanTakeCopyObjectCheckFunctions.Contains(delegateFunc)) | ||
259 | CanTakeCopyObjectCheckFunctions.Remove(delegateFunc); | ||
260 | } | ||
261 | 263 | ||
262 | public bool ExternalChecksCanTakeCopyObject(LLUUID objectID, LLUUID userID) | 264 | public void removeCheckTakeCopyObject(CanTakeCopyObject delegateFunc) |
265 | { | ||
266 | if (CanTakeCopyObjectCheckFunctions.Contains(delegateFunc)) | ||
267 | CanTakeCopyObjectCheckFunctions.Remove(delegateFunc); | ||
268 | } | ||
269 | |||
270 | public bool ExternalChecksCanTakeCopyObject(LLUUID objectID, LLUUID userID) | ||
271 | { | ||
272 | foreach (CanTakeCopyObject check in CanTakeCopyObjectCheckFunctions) | ||
263 | { | 273 | { |
264 | foreach (CanTakeCopyObject check in CanTakeCopyObjectCheckFunctions) | 274 | if (check(objectID,userID,m_scene) == false) |
265 | { | 275 | { |
266 | if (check(objectID,userID,m_scene) == false) | 276 | return false; |
267 | { | ||
268 | return false; | ||
269 | } | ||
270 | } | 277 | } |
271 | return true; | ||
272 | } | 278 | } |
279 | return true; | ||
280 | } | ||
273 | 281 | ||
274 | #endregion | 282 | #endregion |
275 | 283 | ||
276 | #region DUPLICATE OBJECT | 284 | #region DUPLICATE OBJECT |
277 | public delegate bool CanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, Scene scene, LLVector3 objectPosition); | 285 | public delegate bool CanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, Scene scene, LLVector3 objectPosition); |
278 | private List<CanDuplicateObject> CanDuplicateObjectCheckFunctions = new List<CanDuplicateObject>(); | 286 | private List<CanDuplicateObject> CanDuplicateObjectCheckFunctions = new List<CanDuplicateObject>(); |
279 | 287 | ||
280 | public void addCheckDuplicateObject(CanDuplicateObject delegateFunc) | 288 | public void addCheckDuplicateObject(CanDuplicateObject delegateFunc) |
281 | { | 289 | { |
282 | if (!CanDuplicateObjectCheckFunctions.Contains(delegateFunc)) | 290 | if (!CanDuplicateObjectCheckFunctions.Contains(delegateFunc)) |
283 | CanDuplicateObjectCheckFunctions.Add(delegateFunc); | 291 | CanDuplicateObjectCheckFunctions.Add(delegateFunc); |
284 | } | 292 | } |
285 | public void removeCheckDuplicateObject(CanDuplicateObject delegateFunc) | ||
286 | { | ||
287 | if (CanDuplicateObjectCheckFunctions.Contains(delegateFunc)) | ||
288 | CanDuplicateObjectCheckFunctions.Remove(delegateFunc); | ||
289 | } | ||
290 | 293 | ||
291 | public bool ExternalChecksCanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, LLVector3 objectPosition) | 294 | public void removeCheckDuplicateObject(CanDuplicateObject delegateFunc) |
295 | { | ||
296 | if (CanDuplicateObjectCheckFunctions.Contains(delegateFunc)) | ||
297 | CanDuplicateObjectCheckFunctions.Remove(delegateFunc); | ||
298 | } | ||
299 | |||
300 | public bool ExternalChecksCanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, LLVector3 objectPosition) | ||
301 | { | ||
302 | foreach (CanDuplicateObject check in CanDuplicateObjectCheckFunctions) | ||
292 | { | 303 | { |
293 | foreach (CanDuplicateObject check in CanDuplicateObjectCheckFunctions) | 304 | if (check(objectCount, objectID, owner, m_scene, objectPosition) == false) |
294 | { | 305 | { |
295 | if (check(objectCount, objectID, owner, m_scene, objectPosition) == false) | 306 | return false; |
296 | { | ||
297 | return false; | ||
298 | } | ||
299 | } | 307 | } |
300 | return true; | ||
301 | } | 308 | } |
309 | return true; | ||
310 | } | ||
302 | 311 | ||
303 | #endregion | 312 | #endregion |
304 | 313 | ||
305 | #region EDIT OBJECT | 314 | #region EDIT OBJECT |
306 | public delegate bool CanEditObject(LLUUID objectID, LLUUID editorID, Scene scene); | 315 | public delegate bool CanEditObject(LLUUID objectID, LLUUID editorID, Scene scene); |
307 | private List<CanEditObject> CanEditObjectCheckFunctions = new List<CanEditObject>(); | 316 | private List<CanEditObject> CanEditObjectCheckFunctions = new List<CanEditObject>(); |
308 | 317 | ||
309 | public void addCheckEditObject(CanEditObject delegateFunc) | 318 | public void addCheckEditObject(CanEditObject delegateFunc) |
310 | { | 319 | { |
311 | if (!CanEditObjectCheckFunctions.Contains(delegateFunc)) | 320 | if (!CanEditObjectCheckFunctions.Contains(delegateFunc)) |
312 | CanEditObjectCheckFunctions.Add(delegateFunc); | 321 | CanEditObjectCheckFunctions.Add(delegateFunc); |
313 | } | 322 | } |
314 | public void removeCheckEditObject(CanEditObject delegateFunc) | ||
315 | { | ||
316 | if (CanEditObjectCheckFunctions.Contains(delegateFunc)) | ||
317 | CanEditObjectCheckFunctions.Remove(delegateFunc); | ||
318 | } | ||
319 | 323 | ||
320 | public bool ExternalChecksCanEditObject(LLUUID objectID, LLUUID editorID) | 324 | public void removeCheckEditObject(CanEditObject delegateFunc) |
325 | { | ||
326 | if (CanEditObjectCheckFunctions.Contains(delegateFunc)) | ||
327 | CanEditObjectCheckFunctions.Remove(delegateFunc); | ||
328 | } | ||
329 | |||
330 | public bool ExternalChecksCanEditObject(LLUUID objectID, LLUUID editorID) | ||
331 | { | ||
332 | foreach (CanEditObject check in CanEditObjectCheckFunctions) | ||
321 | { | 333 | { |
322 | foreach (CanEditObject check in CanEditObjectCheckFunctions) | 334 | if (check(objectID, editorID, m_scene) == false) |
323 | { | 335 | { |
324 | if (check(objectID, editorID, m_scene) == false) | 336 | return false; |
325 | { | ||
326 | return false; | ||
327 | } | ||
328 | } | 337 | } |
329 | return true; | ||
330 | } | 338 | } |
339 | return true; | ||
340 | } | ||
331 | 341 | ||
332 | #endregion | 342 | #endregion |
333 | 343 | ||
334 | #region MOVE OBJECT | 344 | #region MOVE OBJECT |
335 | public delegate bool CanMoveObject(LLUUID objectID, LLUUID moverID, Scene scene); | 345 | public delegate bool CanMoveObject(LLUUID objectID, LLUUID moverID, Scene scene); |
336 | private List<CanMoveObject> CanMoveObjectCheckFunctions = new List<CanMoveObject>(); | 346 | private List<CanMoveObject> CanMoveObjectCheckFunctions = new List<CanMoveObject>(); |
337 | 347 | ||
338 | public void addCheckMoveObject(CanMoveObject delegateFunc) | 348 | public void addCheckMoveObject(CanMoveObject delegateFunc) |
339 | { | 349 | { |
340 | if (!CanMoveObjectCheckFunctions.Contains(delegateFunc)) | 350 | if (!CanMoveObjectCheckFunctions.Contains(delegateFunc)) |
341 | CanMoveObjectCheckFunctions.Add(delegateFunc); | 351 | CanMoveObjectCheckFunctions.Add(delegateFunc); |
342 | } | 352 | } |
343 | public void removeCheckMoveObject(CanMoveObject delegateFunc) | ||
344 | { | ||
345 | if (CanMoveObjectCheckFunctions.Contains(delegateFunc)) | ||
346 | CanMoveObjectCheckFunctions.Remove(delegateFunc); | ||
347 | } | ||
348 | 353 | ||
349 | public bool ExternalChecksCanMoveObject(LLUUID objectID, LLUUID moverID) | 354 | public void removeCheckMoveObject(CanMoveObject delegateFunc) |
355 | { | ||
356 | if (CanMoveObjectCheckFunctions.Contains(delegateFunc)) | ||
357 | CanMoveObjectCheckFunctions.Remove(delegateFunc); | ||
358 | } | ||
359 | |||
360 | public bool ExternalChecksCanMoveObject(LLUUID objectID, LLUUID moverID) | ||
361 | { | ||
362 | foreach (CanMoveObject check in CanMoveObjectCheckFunctions) | ||
350 | { | 363 | { |
351 | foreach (CanMoveObject check in CanMoveObjectCheckFunctions) | 364 | if (check(objectID,moverID,m_scene) == false) |
352 | { | 365 | { |
353 | if (check(objectID,moverID,m_scene) == false) | 366 | return false; |
354 | { | ||
355 | return false; | ||
356 | } | ||
357 | } | 367 | } |
358 | return true; | ||
359 | } | 368 | } |
369 | return true; | ||
370 | } | ||
360 | 371 | ||
361 | #endregion | 372 | #endregion |
362 | 373 | ||
363 | #region OBJECT ENTRY | 374 | #region OBJECT ENTRY |
364 | public delegate bool CanObjectEntry(LLUUID objectID, LLVector3 newPoint, Scene scene); | 375 | public delegate bool CanObjectEntry(LLUUID objectID, LLVector3 newPoint, Scene scene); |
365 | private List<CanObjectEntry> CanObjectEntryCheckFunctions = new List<CanObjectEntry>(); | 376 | private List<CanObjectEntry> CanObjectEntryCheckFunctions = new List<CanObjectEntry>(); |
366 | 377 | ||
367 | public void addCheckObjectEntry(CanObjectEntry delegateFunc) | 378 | public void addCheckObjectEntry(CanObjectEntry delegateFunc) |
368 | { | 379 | { |
369 | if (!CanObjectEntryCheckFunctions.Contains(delegateFunc)) | 380 | if (!CanObjectEntryCheckFunctions.Contains(delegateFunc)) |
370 | CanObjectEntryCheckFunctions.Add(delegateFunc); | 381 | CanObjectEntryCheckFunctions.Add(delegateFunc); |
371 | } | 382 | } |
372 | public void removeCheckObjectEntry(CanObjectEntry delegateFunc) | ||
373 | { | ||
374 | if (CanObjectEntryCheckFunctions.Contains(delegateFunc)) | ||
375 | CanObjectEntryCheckFunctions.Remove(delegateFunc); | ||
376 | } | ||
377 | 383 | ||
378 | public bool ExternalChecksCanObjectEntry(LLUUID objectID, LLVector3 newPoint) | 384 | public void removeCheckObjectEntry(CanObjectEntry delegateFunc) |
385 | { | ||
386 | if (CanObjectEntryCheckFunctions.Contains(delegateFunc)) | ||
387 | CanObjectEntryCheckFunctions.Remove(delegateFunc); | ||
388 | } | ||
389 | |||
390 | public bool ExternalChecksCanObjectEntry(LLUUID objectID, LLVector3 newPoint) | ||
391 | { | ||
392 | foreach (CanObjectEntry check in CanObjectEntryCheckFunctions) | ||
379 | { | 393 | { |
380 | foreach (CanObjectEntry check in CanObjectEntryCheckFunctions) | 394 | if (check(objectID, newPoint, m_scene) == false) |
381 | { | 395 | { |
382 | if (check(objectID, newPoint, m_scene) == false) | 396 | return false; |
383 | { | ||
384 | return false; | ||
385 | } | ||
386 | } | 397 | } |
387 | return true; | ||
388 | } | 398 | } |
399 | return true; | ||
400 | } | ||
389 | 401 | ||
390 | #endregion | 402 | #endregion |
391 | 403 | ||
392 | #region RETURN OBJECT | 404 | #region RETURN OBJECT |
393 | public delegate bool CanReturnObject(LLUUID objectID, LLUUID returnerID, Scene scene); | 405 | public delegate bool CanReturnObject(LLUUID objectID, LLUUID returnerID, Scene scene); |
394 | private List<CanReturnObject> CanReturnObjectCheckFunctions = new List<CanReturnObject>(); | 406 | private List<CanReturnObject> CanReturnObjectCheckFunctions = new List<CanReturnObject>(); |
395 | 407 | ||
396 | public void addCheckReturnObject(CanReturnObject delegateFunc) | 408 | public void addCheckReturnObject(CanReturnObject delegateFunc) |
397 | { | 409 | { |
398 | if (!CanReturnObjectCheckFunctions.Contains(delegateFunc)) | 410 | if (!CanReturnObjectCheckFunctions.Contains(delegateFunc)) |
399 | CanReturnObjectCheckFunctions.Add(delegateFunc); | 411 | CanReturnObjectCheckFunctions.Add(delegateFunc); |
400 | } | 412 | } |
401 | public void removeCheckReturnObject(CanReturnObject delegateFunc) | ||
402 | { | ||
403 | if (CanReturnObjectCheckFunctions.Contains(delegateFunc)) | ||
404 | CanReturnObjectCheckFunctions.Remove(delegateFunc); | ||
405 | } | ||
406 | 413 | ||
407 | public bool ExternalChecksCanReturnObject(LLUUID objectID, LLUUID returnerID) | 414 | public void removeCheckReturnObject(CanReturnObject delegateFunc) |
415 | { | ||
416 | if (CanReturnObjectCheckFunctions.Contains(delegateFunc)) | ||
417 | CanReturnObjectCheckFunctions.Remove(delegateFunc); | ||
418 | } | ||
419 | |||
420 | public bool ExternalChecksCanReturnObject(LLUUID objectID, LLUUID returnerID) | ||
421 | { | ||
422 | foreach (CanReturnObject check in CanReturnObjectCheckFunctions) | ||
408 | { | 423 | { |
409 | foreach (CanReturnObject check in CanReturnObjectCheckFunctions) | 424 | if (check(objectID,returnerID,m_scene) == false) |
410 | { | 425 | { |
411 | if (check(objectID,returnerID,m_scene) == false) | 426 | return false; |
412 | { | ||
413 | return false; | ||
414 | } | ||
415 | } | 427 | } |
416 | return true; | ||
417 | } | 428 | } |
429 | return true; | ||
430 | } | ||
418 | 431 | ||
419 | #endregion | 432 | #endregion |
420 | 433 | ||
421 | #region INSTANT MESSAGE | 434 | #region INSTANT MESSAGE |
422 | public delegate bool CanInstantMessage(LLUUID user, LLUUID target, Scene startScene); | 435 | public delegate bool CanInstantMessage(LLUUID user, LLUUID target, Scene startScene); |
423 | private List<CanInstantMessage> CanInstantMessageCheckFunctions = new List<CanInstantMessage>(); | 436 | private List<CanInstantMessage> CanInstantMessageCheckFunctions = new List<CanInstantMessage>(); |
424 | 437 | ||
425 | public void addCheckInstantMessage(CanInstantMessage delegateFunc) | 438 | public void addCheckInstantMessage(CanInstantMessage delegateFunc) |
426 | { | 439 | { |
427 | if (!CanInstantMessageCheckFunctions.Contains(delegateFunc)) | 440 | if (!CanInstantMessageCheckFunctions.Contains(delegateFunc)) |
428 | CanInstantMessageCheckFunctions.Add(delegateFunc); | 441 | CanInstantMessageCheckFunctions.Add(delegateFunc); |
429 | } | 442 | } |
430 | public void removeCheckInstantMessage(CanInstantMessage delegateFunc) | 443 | |
431 | { | 444 | public void removeCheckInstantMessage(CanInstantMessage delegateFunc) |
432 | if (CanInstantMessageCheckFunctions.Contains(delegateFunc)) | 445 | { |
433 | CanInstantMessageCheckFunctions.Remove(delegateFunc); | 446 | if (CanInstantMessageCheckFunctions.Contains(delegateFunc)) |
434 | } | 447 | CanInstantMessageCheckFunctions.Remove(delegateFunc); |
448 | } | ||
435 | 449 | ||
436 | public bool ExternalChecksCanInstantMessage(LLUUID user, LLUUID target) | 450 | public bool ExternalChecksCanInstantMessage(LLUUID user, LLUUID target) |
451 | { | ||
452 | foreach (CanInstantMessage check in CanInstantMessageCheckFunctions) | ||
437 | { | 453 | { |
438 | foreach (CanInstantMessage check in CanInstantMessageCheckFunctions) | 454 | if (check(user, target, m_scene) == false) |
439 | { | 455 | { |
440 | if (check(user, target, m_scene) == false) | 456 | return false; |
441 | { | ||
442 | return false; | ||
443 | } | ||
444 | } | 457 | } |
445 | return true; | ||
446 | } | 458 | } |
459 | return true; | ||
460 | } | ||
447 | 461 | ||
448 | #endregion | 462 | #endregion |
449 | 463 | ||
450 | #region INVENTORY TRANSFER | 464 | #region INVENTORY TRANSFER |
451 | public delegate bool CanInventoryTransfer(LLUUID user, LLUUID target, Scene startScene); | 465 | public delegate bool CanInventoryTransfer(LLUUID user, LLUUID target, Scene startScene); |
452 | private List<CanInventoryTransfer> CanInventoryTransferCheckFunctions = new List<CanInventoryTransfer>(); | 466 | private List<CanInventoryTransfer> CanInventoryTransferCheckFunctions = new List<CanInventoryTransfer>(); |
453 | 467 | ||
454 | public void addCheckInventoryTransfer(CanInventoryTransfer delegateFunc) | 468 | public void addCheckInventoryTransfer(CanInventoryTransfer delegateFunc) |
455 | { | 469 | { |
456 | if (!CanInventoryTransferCheckFunctions.Contains(delegateFunc)) | 470 | if (!CanInventoryTransferCheckFunctions.Contains(delegateFunc)) |
457 | CanInventoryTransferCheckFunctions.Add(delegateFunc); | 471 | CanInventoryTransferCheckFunctions.Add(delegateFunc); |
458 | } | 472 | } |
459 | public void removeCheckInventoryTransfer(CanInventoryTransfer delegateFunc) | 473 | |
474 | public void removeCheckInventoryTransfer(CanInventoryTransfer delegateFunc) | ||
460 | { | 475 | { |
461 | if (CanInventoryTransferCheckFunctions.Contains(delegateFunc)) | 476 | if (CanInventoryTransferCheckFunctions.Contains(delegateFunc)) |
462 | CanInventoryTransferCheckFunctions.Remove(delegateFunc); | 477 | CanInventoryTransferCheckFunctions.Remove(delegateFunc); |
463 | } | 478 | } |
464 | 479 | ||
465 | public bool ExternalChecksCanInventoryTransfer(LLUUID user, LLUUID target) | 480 | public bool ExternalChecksCanInventoryTransfer(LLUUID user, LLUUID target) |
481 | { | ||
482 | foreach (CanInventoryTransfer check in CanInventoryTransferCheckFunctions) | ||
466 | { | 483 | { |
467 | foreach (CanInventoryTransfer check in CanInventoryTransferCheckFunctions) | 484 | if (check(user, target, m_scene) == false) |
468 | { | 485 | { |
469 | if (check(user, target, m_scene) == false) | 486 | return false; |
470 | { | ||
471 | return false; | ||
472 | } | ||
473 | } | 487 | } |
474 | return true; | ||
475 | } | 488 | } |
489 | return true; | ||
490 | } | ||
476 | 491 | ||
477 | #endregion | 492 | #endregion |
478 | 493 | ||
479 | #region VIEW SCRIPT | 494 | #region VIEW SCRIPT |
480 | public delegate bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); | 495 | public delegate bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); |
481 | private List<CanViewScript> CanViewScriptCheckFunctions = new List<CanViewScript>(); | 496 | private List<CanViewScript> CanViewScriptCheckFunctions = new List<CanViewScript>(); |
482 | 497 | ||
483 | public void addCheckViewScript(CanViewScript delegateFunc) | 498 | public void addCheckViewScript(CanViewScript delegateFunc) |
484 | { | 499 | { |
485 | if (!CanViewScriptCheckFunctions.Contains(delegateFunc)) | 500 | if (!CanViewScriptCheckFunctions.Contains(delegateFunc)) |
486 | CanViewScriptCheckFunctions.Add(delegateFunc); | 501 | CanViewScriptCheckFunctions.Add(delegateFunc); |
487 | } | 502 | } |
488 | public void removeCheckViewScript(CanViewScript delegateFunc) | ||
489 | { | ||
490 | if (CanViewScriptCheckFunctions.Contains(delegateFunc)) | ||
491 | CanViewScriptCheckFunctions.Remove(delegateFunc); | ||
492 | } | ||
493 | 503 | ||
494 | public bool ExternalChecksCanViewScript(LLUUID script, LLUUID objectID, LLUUID user) | 504 | public void removeCheckViewScript(CanViewScript delegateFunc) |
505 | { | ||
506 | if (CanViewScriptCheckFunctions.Contains(delegateFunc)) | ||
507 | CanViewScriptCheckFunctions.Remove(delegateFunc); | ||
508 | } | ||
509 | |||
510 | public bool ExternalChecksCanViewScript(LLUUID script, LLUUID objectID, LLUUID user) | ||
511 | { | ||
512 | foreach (CanViewScript check in CanViewScriptCheckFunctions) | ||
495 | { | 513 | { |
496 | foreach (CanViewScript check in CanViewScriptCheckFunctions) | 514 | if (check(script, objectID, user, m_scene) == false) |
497 | { | 515 | { |
498 | if (check(script, objectID, user, m_scene) == false) | 516 | return false; |
499 | { | ||
500 | return false; | ||
501 | } | ||
502 | } | 517 | } |
503 | return true; | ||
504 | } | 518 | } |
519 | return true; | ||
520 | } | ||
505 | 521 | ||
506 | public delegate bool CanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); | 522 | public delegate bool CanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); |
507 | private List<CanViewNotecard> CanViewNotecardCheckFunctions = new List<CanViewNotecard>(); | 523 | private List<CanViewNotecard> CanViewNotecardCheckFunctions = new List<CanViewNotecard>(); |
508 | 524 | ||
509 | public void addCheckViewNotecard(CanViewNotecard delegateFunc) | 525 | public void addCheckViewNotecard(CanViewNotecard delegateFunc) |
510 | { | 526 | { |
511 | if (!CanViewNotecardCheckFunctions.Contains(delegateFunc)) | 527 | if (!CanViewNotecardCheckFunctions.Contains(delegateFunc)) |
512 | CanViewNotecardCheckFunctions.Add(delegateFunc); | 528 | CanViewNotecardCheckFunctions.Add(delegateFunc); |
513 | } | 529 | } |
514 | public void removeCheckViewNotecard(CanViewNotecard delegateFunc) | 530 | |
515 | { | 531 | public void removeCheckViewNotecard(CanViewNotecard delegateFunc) |
516 | if (CanViewNotecardCheckFunctions.Contains(delegateFunc)) | 532 | { |
517 | CanViewNotecardCheckFunctions.Remove(delegateFunc); | 533 | if (CanViewNotecardCheckFunctions.Contains(delegateFunc)) |
518 | } | 534 | CanViewNotecardCheckFunctions.Remove(delegateFunc); |
535 | } | ||
519 | 536 | ||
520 | public bool ExternalChecksCanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user) | 537 | public bool ExternalChecksCanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user) |
538 | { | ||
539 | foreach (CanViewNotecard check in CanViewNotecardCheckFunctions) | ||
521 | { | 540 | { |
522 | foreach (CanViewNotecard check in CanViewNotecardCheckFunctions) | 541 | if (check(script, objectID, user, m_scene) == false) |
523 | { | 542 | { |
524 | if (check(script, objectID, user, m_scene) == false) | 543 | return false; |
525 | { | ||
526 | return false; | ||
527 | } | ||
528 | } | 544 | } |
529 | return true; | ||
530 | } | 545 | } |
546 | return true; | ||
547 | } | ||
548 | |||
549 | #endregion | ||
531 | 550 | ||
532 | #endregion | 551 | #region EDIT SCRIPT |
552 | public delegate bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); | ||
553 | private List<CanEditScript> CanEditScriptCheckFunctions = new List<CanEditScript>(); | ||
533 | 554 | ||
534 | #region EDIT SCRIPT | 555 | public void addCheckEditScript(CanEditScript delegateFunc) |
535 | public delegate bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); | 556 | { |
536 | private List<CanEditScript> CanEditScriptCheckFunctions = new List<CanEditScript>(); | 557 | if (!CanEditScriptCheckFunctions.Contains(delegateFunc)) |
558 | CanEditScriptCheckFunctions.Add(delegateFunc); | ||
559 | } | ||
537 | 560 | ||
538 | public void addCheckEditScript(CanEditScript delegateFunc) | 561 | public void removeCheckEditScript(CanEditScript delegateFunc) |
539 | { | 562 | { |
540 | if (!CanEditScriptCheckFunctions.Contains(delegateFunc)) | 563 | if (CanEditScriptCheckFunctions.Contains(delegateFunc)) |
541 | CanEditScriptCheckFunctions.Add(delegateFunc); | 564 | CanEditScriptCheckFunctions.Remove(delegateFunc); |
542 | } | 565 | } |
543 | public void removeCheckEditScript(CanEditScript delegateFunc) | ||
544 | { | ||
545 | if (CanEditScriptCheckFunctions.Contains(delegateFunc)) | ||
546 | CanEditScriptCheckFunctions.Remove(delegateFunc); | ||
547 | } | ||
548 | 566 | ||
549 | public bool ExternalChecksCanEditScript(LLUUID script, LLUUID objectID, LLUUID user) | 567 | public bool ExternalChecksCanEditScript(LLUUID script, LLUUID objectID, LLUUID user) |
568 | { | ||
569 | foreach (CanEditScript check in CanEditScriptCheckFunctions) | ||
550 | { | 570 | { |
551 | foreach (CanEditScript check in CanEditScriptCheckFunctions) | 571 | if (check(script, objectID, user, m_scene) == false) |
552 | { | 572 | { |
553 | if (check(script, objectID, user, m_scene) == false) | 573 | return false; |
554 | { | ||
555 | return false; | ||
556 | } | ||
557 | } | 574 | } |
558 | return true; | ||
559 | } | 575 | } |
576 | return true; | ||
577 | } | ||
560 | 578 | ||
561 | public delegate bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene); | 579 | public delegate bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene); |
562 | private List<CanEditNotecard> CanEditNotecardCheckFunctions = new List<CanEditNotecard>(); | 580 | private List<CanEditNotecard> CanEditNotecardCheckFunctions = new List<CanEditNotecard>(); |
563 | 581 | ||
564 | public void addCheckEditNotecard(CanEditNotecard delegateFunc) | 582 | public void addCheckEditNotecard(CanEditNotecard delegateFunc) |
565 | { | 583 | { |
566 | if (!CanEditNotecardCheckFunctions.Contains(delegateFunc)) | 584 | if (!CanEditNotecardCheckFunctions.Contains(delegateFunc)) |
567 | CanEditNotecardCheckFunctions.Add(delegateFunc); | 585 | CanEditNotecardCheckFunctions.Add(delegateFunc); |
568 | } | 586 | } |
569 | public void removeCheckEditNotecard(CanEditNotecard delegateFunc) | ||
570 | { | ||
571 | if (CanEditNotecardCheckFunctions.Contains(delegateFunc)) | ||
572 | CanEditNotecardCheckFunctions.Remove(delegateFunc); | ||
573 | } | ||
574 | 587 | ||
575 | public bool ExternalChecksCanEditNotecard(LLUUID script, LLUUID objectID, LLUUID user) | 588 | public void removeCheckEditNotecard(CanEditNotecard delegateFunc) |
589 | { | ||
590 | if (CanEditNotecardCheckFunctions.Contains(delegateFunc)) | ||
591 | CanEditNotecardCheckFunctions.Remove(delegateFunc); | ||
592 | } | ||
593 | |||
594 | public bool ExternalChecksCanEditNotecard(LLUUID script, LLUUID objectID, LLUUID user) | ||
576 | { | 595 | { |
577 | foreach (CanEditNotecard check in CanEditNotecardCheckFunctions) | 596 | foreach (CanEditNotecard check in CanEditNotecardCheckFunctions) |
578 | { | 597 | { |
@@ -584,388 +603,402 @@ namespace OpenSim.Region.Environment.Scenes | |||
584 | return true; | 603 | return true; |
585 | } | 604 | } |
586 | 605 | ||
587 | #endregion | 606 | #endregion |
588 | 607 | ||
589 | #region RUN SCRIPT (When Script Placed in Object) | 608 | #region RUN SCRIPT (When Script Placed in Object) |
590 | public delegate bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); | 609 | public delegate bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); |
591 | private List<CanRunScript> CanRunScriptCheckFunctions = new List<CanRunScript>(); | 610 | private List<CanRunScript> CanRunScriptCheckFunctions = new List<CanRunScript>(); |
592 | 611 | ||
593 | public void addCheckRunScript(CanRunScript delegateFunc) | 612 | public void addCheckRunScript(CanRunScript delegateFunc) |
594 | { | 613 | { |
595 | if (!CanRunScriptCheckFunctions.Contains(delegateFunc)) | 614 | if (!CanRunScriptCheckFunctions.Contains(delegateFunc)) |
596 | CanRunScriptCheckFunctions.Add(delegateFunc); | 615 | CanRunScriptCheckFunctions.Add(delegateFunc); |
597 | } | 616 | } |
598 | public void removeCheckRunScript(CanRunScript delegateFunc) | ||
599 | { | ||
600 | if (CanRunScriptCheckFunctions.Contains(delegateFunc)) | ||
601 | CanRunScriptCheckFunctions.Remove(delegateFunc); | ||
602 | } | ||
603 | 617 | ||
604 | public bool ExternalChecksCanRunScript(LLUUID script, LLUUID objectID, LLUUID user) | 618 | public void removeCheckRunScript(CanRunScript delegateFunc) |
619 | { | ||
620 | if (CanRunScriptCheckFunctions.Contains(delegateFunc)) | ||
621 | CanRunScriptCheckFunctions.Remove(delegateFunc); | ||
622 | } | ||
623 | |||
624 | public bool ExternalChecksCanRunScript(LLUUID script, LLUUID objectID, LLUUID user) | ||
625 | { | ||
626 | foreach (CanRunScript check in CanRunScriptCheckFunctions) | ||
605 | { | 627 | { |
606 | foreach (CanRunScript check in CanRunScriptCheckFunctions) | 628 | if (check(script, objectID, user, m_scene) == false) |
607 | { | 629 | { |
608 | if (check(script, objectID, user, m_scene) == false) | 630 | return false; |
609 | { | ||
610 | return false; | ||
611 | } | ||
612 | } | 631 | } |
613 | return true; | ||
614 | } | 632 | } |
633 | return true; | ||
634 | } | ||
615 | 635 | ||
616 | #endregion | 636 | #endregion |
617 | 637 | ||
618 | #region START SCRIPT (When Script run box is Checked after placed in object) | 638 | #region START SCRIPT (When Script run box is Checked after placed in object) |
619 | public delegate bool CanStartScript(LLUUID script, LLUUID user, Scene scene); | 639 | public delegate bool CanStartScript(LLUUID script, LLUUID user, Scene scene); |
620 | private List<CanStartScript> CanStartScriptCheckFunctions = new List<CanStartScript>(); | 640 | private List<CanStartScript> CanStartScriptCheckFunctions = new List<CanStartScript>(); |
621 | 641 | ||
622 | public void addCheckStartScript(CanStartScript delegateFunc) | 642 | public void addCheckStartScript(CanStartScript delegateFunc) |
623 | { | 643 | { |
624 | if (!CanStartScriptCheckFunctions.Contains(delegateFunc)) | 644 | if (!CanStartScriptCheckFunctions.Contains(delegateFunc)) |
625 | CanStartScriptCheckFunctions.Add(delegateFunc); | 645 | CanStartScriptCheckFunctions.Add(delegateFunc); |
626 | } | 646 | } |
627 | public void removeCheckStartScript(CanStartScript delegateFunc) | ||
628 | { | ||
629 | if (CanStartScriptCheckFunctions.Contains(delegateFunc)) | ||
630 | CanStartScriptCheckFunctions.Remove(delegateFunc); | ||
631 | } | ||
632 | 647 | ||
633 | public bool ExternalChecksCanStartScript(LLUUID script, LLUUID user) | 648 | public void removeCheckStartScript(CanStartScript delegateFunc) |
649 | { | ||
650 | if (CanStartScriptCheckFunctions.Contains(delegateFunc)) | ||
651 | CanStartScriptCheckFunctions.Remove(delegateFunc); | ||
652 | } | ||
653 | |||
654 | public bool ExternalChecksCanStartScript(LLUUID script, LLUUID user) | ||
655 | { | ||
656 | foreach (CanStartScript check in CanStartScriptCheckFunctions) | ||
634 | { | 657 | { |
635 | foreach (CanStartScript check in CanStartScriptCheckFunctions) | 658 | if (check(script, user, m_scene) == false) |
636 | { | 659 | { |
637 | if (check(script, user, m_scene) == false) | 660 | return false; |
638 | { | ||
639 | return false; | ||
640 | } | ||
641 | } | 661 | } |
642 | return true; | ||
643 | } | 662 | } |
663 | return true; | ||
664 | } | ||
644 | 665 | ||
645 | #endregion | 666 | #endregion |
646 | 667 | ||
647 | #region STOP SCRIPT (When Script run box is unchecked after placed in object) | 668 | #region STOP SCRIPT (When Script run box is unchecked after placed in object) |
648 | public delegate bool CanStopScript(LLUUID script, LLUUID user, Scene scene); | 669 | public delegate bool CanStopScript(LLUUID script, LLUUID user, Scene scene); |
649 | private List<CanStopScript> CanStopScriptCheckFunctions = new List<CanStopScript>(); | 670 | private List<CanStopScript> CanStopScriptCheckFunctions = new List<CanStopScript>(); |
650 | 671 | ||
651 | public void addCheckStopScript(CanStopScript delegateFunc) | 672 | public void addCheckStopScript(CanStopScript delegateFunc) |
652 | { | 673 | { |
653 | if (!CanStopScriptCheckFunctions.Contains(delegateFunc)) | 674 | if (!CanStopScriptCheckFunctions.Contains(delegateFunc)) |
654 | CanStopScriptCheckFunctions.Add(delegateFunc); | 675 | CanStopScriptCheckFunctions.Add(delegateFunc); |
655 | } | 676 | } |
656 | public void removeCheckStopScript(CanStopScript delegateFunc) | ||
657 | { | ||
658 | if (CanStopScriptCheckFunctions.Contains(delegateFunc)) | ||
659 | CanStopScriptCheckFunctions.Remove(delegateFunc); | ||
660 | } | ||
661 | 677 | ||
662 | public bool ExternalChecksCanStopScript(LLUUID script, LLUUID user) | 678 | public void removeCheckStopScript(CanStopScript delegateFunc) |
679 | { | ||
680 | if (CanStopScriptCheckFunctions.Contains(delegateFunc)) | ||
681 | CanStopScriptCheckFunctions.Remove(delegateFunc); | ||
682 | } | ||
683 | |||
684 | public bool ExternalChecksCanStopScript(LLUUID script, LLUUID user) | ||
685 | { | ||
686 | foreach (CanStopScript check in CanStopScriptCheckFunctions) | ||
663 | { | 687 | { |
664 | foreach (CanStopScript check in CanStopScriptCheckFunctions) | 688 | if (check(script, user, m_scene) == false) |
665 | { | 689 | { |
666 | if (check(script, user, m_scene) == false) | 690 | return false; |
667 | { | ||
668 | return false; | ||
669 | } | ||
670 | } | 691 | } |
671 | return true; | ||
672 | } | 692 | } |
693 | return true; | ||
694 | } | ||
673 | 695 | ||
674 | #endregion | 696 | #endregion |
675 | 697 | ||
676 | #region RESET SCRIPT | 698 | #region RESET SCRIPT |
677 | public delegate bool CanResetScript(LLUUID script, LLUUID user, Scene scene); | 699 | public delegate bool CanResetScript(LLUUID script, LLUUID user, Scene scene); |
678 | private List<CanResetScript> CanResetScriptCheckFunctions = new List<CanResetScript>(); | 700 | private List<CanResetScript> CanResetScriptCheckFunctions = new List<CanResetScript>(); |
679 | 701 | ||
680 | public void addCheckResetScript(CanResetScript delegateFunc) | 702 | public void addCheckResetScript(CanResetScript delegateFunc) |
681 | { | 703 | { |
682 | if (!CanResetScriptCheckFunctions.Contains(delegateFunc)) | 704 | if (!CanResetScriptCheckFunctions.Contains(delegateFunc)) |
683 | CanResetScriptCheckFunctions.Add(delegateFunc); | 705 | CanResetScriptCheckFunctions.Add(delegateFunc); |
684 | } | 706 | } |
685 | public void removeCheckResetScript(CanResetScript delegateFunc) | 707 | |
686 | { | 708 | public void removeCheckResetScript(CanResetScript delegateFunc) |
687 | if (CanResetScriptCheckFunctions.Contains(delegateFunc)) | 709 | { |
688 | CanResetScriptCheckFunctions.Remove(delegateFunc); | 710 | if (CanResetScriptCheckFunctions.Contains(delegateFunc)) |
689 | } | 711 | CanResetScriptCheckFunctions.Remove(delegateFunc); |
712 | } | ||
690 | 713 | ||
691 | public bool ExternalChecksCanResetScript(LLUUID script, LLUUID user) | 714 | public bool ExternalChecksCanResetScript(LLUUID script, LLUUID user) |
715 | { | ||
716 | foreach (CanResetScript check in CanResetScriptCheckFunctions) | ||
692 | { | 717 | { |
693 | foreach (CanResetScript check in CanResetScriptCheckFunctions) | 718 | if (check(script, user, m_scene) == false) |
694 | { | 719 | { |
695 | if (check(script, user, m_scene) == false) | 720 | return false; |
696 | { | ||
697 | return false; | ||
698 | } | ||
699 | } | 721 | } |
700 | return true; | ||
701 | } | 722 | } |
723 | return true; | ||
724 | } | ||
702 | 725 | ||
703 | #endregion | 726 | #endregion |
704 | 727 | ||
705 | #region TERRAFORM LAND | 728 | #region TERRAFORM LAND |
706 | public delegate bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene); | 729 | public delegate bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene); |
707 | private List<CanTerraformLand> CanTerraformLandCheckFunctions = new List<CanTerraformLand>(); | 730 | private List<CanTerraformLand> CanTerraformLandCheckFunctions = new List<CanTerraformLand>(); |
708 | 731 | ||
709 | public void addCheckTerraformLand(CanTerraformLand delegateFunc) | 732 | public void addCheckTerraformLand(CanTerraformLand delegateFunc) |
710 | { | 733 | { |
711 | if (!CanTerraformLandCheckFunctions.Contains(delegateFunc)) | 734 | if (!CanTerraformLandCheckFunctions.Contains(delegateFunc)) |
712 | CanTerraformLandCheckFunctions.Add(delegateFunc); | 735 | CanTerraformLandCheckFunctions.Add(delegateFunc); |
713 | } | 736 | } |
714 | public void removeCheckTerraformLand(CanTerraformLand delegateFunc) | ||
715 | { | ||
716 | if (CanTerraformLandCheckFunctions.Contains(delegateFunc)) | ||
717 | CanTerraformLandCheckFunctions.Remove(delegateFunc); | ||
718 | } | ||
719 | 737 | ||
720 | public bool ExternalChecksCanTerraformLand(LLUUID user, LLVector3 pos) | 738 | public void removeCheckTerraformLand(CanTerraformLand delegateFunc) |
739 | { | ||
740 | if (CanTerraformLandCheckFunctions.Contains(delegateFunc)) | ||
741 | CanTerraformLandCheckFunctions.Remove(delegateFunc); | ||
742 | } | ||
743 | |||
744 | public bool ExternalChecksCanTerraformLand(LLUUID user, LLVector3 pos) | ||
745 | { | ||
746 | foreach (CanTerraformLand check in CanTerraformLandCheckFunctions) | ||
721 | { | 747 | { |
722 | foreach (CanTerraformLand check in CanTerraformLandCheckFunctions) | 748 | if (check(user, pos, m_scene) == false) |
723 | { | 749 | { |
724 | if (check(user, pos, m_scene) == false) | 750 | return false; |
725 | { | ||
726 | return false; | ||
727 | } | ||
728 | } | 751 | } |
729 | return true; | ||
730 | } | 752 | } |
753 | return true; | ||
754 | } | ||
731 | 755 | ||
732 | #endregion | 756 | #endregion |
733 | 757 | ||
734 | #region RUN CONSOLE COMMAND | 758 | #region RUN CONSOLE COMMAND |
735 | public delegate bool CanRunConsoleCommand(LLUUID user, Scene requestFromScene); | 759 | public delegate bool CanRunConsoleCommand(LLUUID user, Scene requestFromScene); |
736 | private List<CanRunConsoleCommand> CanRunConsoleCommandCheckFunctions = new List<CanRunConsoleCommand>(); | 760 | private List<CanRunConsoleCommand> CanRunConsoleCommandCheckFunctions = new List<CanRunConsoleCommand>(); |
737 | 761 | ||
738 | public void addCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) | 762 | public void addCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) |
739 | { | 763 | { |
740 | if (!CanRunConsoleCommandCheckFunctions.Contains(delegateFunc)) | 764 | if (!CanRunConsoleCommandCheckFunctions.Contains(delegateFunc)) |
741 | CanRunConsoleCommandCheckFunctions.Add(delegateFunc); | 765 | CanRunConsoleCommandCheckFunctions.Add(delegateFunc); |
742 | } | 766 | } |
743 | public void removeCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) | ||
744 | { | ||
745 | if (CanRunConsoleCommandCheckFunctions.Contains(delegateFunc)) | ||
746 | CanRunConsoleCommandCheckFunctions.Remove(delegateFunc); | ||
747 | } | ||
748 | 767 | ||
749 | public bool ExternalChecksCanRunConsoleCommand(LLUUID user) | 768 | public void removeCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) |
769 | { | ||
770 | if (CanRunConsoleCommandCheckFunctions.Contains(delegateFunc)) | ||
771 | CanRunConsoleCommandCheckFunctions.Remove(delegateFunc); | ||
772 | } | ||
773 | |||
774 | public bool ExternalChecksCanRunConsoleCommand(LLUUID user) | ||
775 | { | ||
776 | foreach (CanRunConsoleCommand check in CanRunConsoleCommandCheckFunctions) | ||
750 | { | 777 | { |
751 | foreach (CanRunConsoleCommand check in CanRunConsoleCommandCheckFunctions) | 778 | if (check(user, m_scene) == false) |
752 | { | 779 | { |
753 | if (check(user, m_scene) == false) | 780 | return false; |
754 | { | ||
755 | return false; | ||
756 | } | ||
757 | } | 781 | } |
758 | return true; | ||
759 | } | 782 | } |
783 | return true; | ||
784 | } | ||
760 | 785 | ||
761 | #endregion | 786 | #endregion |
762 | 787 | ||
763 | #region CAN ISSUE ESTATE COMMAND | 788 | #region CAN ISSUE ESTATE COMMAND |
764 | public delegate bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand); | 789 | public delegate bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand); |
765 | private List<CanIssueEstateCommand> CanIssueEstateCommandCheckFunctions = new List<CanIssueEstateCommand>(); | 790 | private List<CanIssueEstateCommand> CanIssueEstateCommandCheckFunctions = new List<CanIssueEstateCommand>(); |
766 | 791 | ||
767 | public void addCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) | 792 | public void addCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) |
768 | { | 793 | { |
769 | if (!CanIssueEstateCommandCheckFunctions.Contains(delegateFunc)) | 794 | if (!CanIssueEstateCommandCheckFunctions.Contains(delegateFunc)) |
770 | CanIssueEstateCommandCheckFunctions.Add(delegateFunc); | 795 | CanIssueEstateCommandCheckFunctions.Add(delegateFunc); |
771 | } | 796 | } |
772 | public void removeCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) | ||
773 | { | ||
774 | if (CanIssueEstateCommandCheckFunctions.Contains(delegateFunc)) | ||
775 | CanIssueEstateCommandCheckFunctions.Remove(delegateFunc); | ||
776 | } | ||
777 | 797 | ||
778 | public bool ExternalChecksCanIssueEstateCommand(LLUUID user, bool ownerCommand) | 798 | public void removeCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) |
799 | { | ||
800 | if (CanIssueEstateCommandCheckFunctions.Contains(delegateFunc)) | ||
801 | CanIssueEstateCommandCheckFunctions.Remove(delegateFunc); | ||
802 | } | ||
803 | |||
804 | public bool ExternalChecksCanIssueEstateCommand(LLUUID user, bool ownerCommand) | ||
805 | { | ||
806 | foreach (CanIssueEstateCommand check in CanIssueEstateCommandCheckFunctions) | ||
779 | { | 807 | { |
780 | foreach (CanIssueEstateCommand check in CanIssueEstateCommandCheckFunctions) | 808 | if (check(user, m_scene, ownerCommand) == false) |
781 | { | 809 | { |
782 | if (check(user, m_scene, ownerCommand) == false) | 810 | return false; |
783 | { | ||
784 | return false; | ||
785 | } | ||
786 | } | 811 | } |
787 | return true; | ||
788 | } | 812 | } |
789 | #endregion | 813 | return true; |
814 | } | ||
815 | #endregion | ||
790 | 816 | ||
791 | #region CAN BE GODLIKE | 817 | #region CAN BE GODLIKE |
792 | public delegate bool CanBeGodLike(LLUUID user, Scene requestFromScene); | 818 | public delegate bool CanBeGodLike(LLUUID user, Scene requestFromScene); |
793 | private List<CanBeGodLike> CanBeGodLikeCheckFunctions = new List<CanBeGodLike>(); | 819 | private List<CanBeGodLike> CanBeGodLikeCheckFunctions = new List<CanBeGodLike>(); |
794 | 820 | ||
795 | public void addCheckBeGodLike(CanBeGodLike delegateFunc) | 821 | public void addCheckBeGodLike(CanBeGodLike delegateFunc) |
796 | { | 822 | { |
797 | if (!CanBeGodLikeCheckFunctions.Contains(delegateFunc)) | 823 | if (!CanBeGodLikeCheckFunctions.Contains(delegateFunc)) |
798 | CanBeGodLikeCheckFunctions.Add(delegateFunc); | 824 | CanBeGodLikeCheckFunctions.Add(delegateFunc); |
799 | } | 825 | } |
800 | public void removeCheckBeGodLike(CanBeGodLike delegateFunc) | 826 | |
801 | { | 827 | public void removeCheckBeGodLike(CanBeGodLike delegateFunc) |
802 | if (CanBeGodLikeCheckFunctions.Contains(delegateFunc)) | 828 | { |
803 | CanBeGodLikeCheckFunctions.Remove(delegateFunc); | 829 | if (CanBeGodLikeCheckFunctions.Contains(delegateFunc)) |
804 | } | 830 | CanBeGodLikeCheckFunctions.Remove(delegateFunc); |
831 | } | ||
805 | 832 | ||
806 | public bool ExternalChecksCanBeGodLike(LLUUID user) | 833 | public bool ExternalChecksCanBeGodLike(LLUUID user) |
834 | { | ||
835 | foreach (CanBeGodLike check in CanBeGodLikeCheckFunctions) | ||
807 | { | 836 | { |
808 | foreach (CanBeGodLike check in CanBeGodLikeCheckFunctions) | 837 | if (check(user, m_scene) == false) |
809 | { | 838 | { |
810 | if (check(user, m_scene) == false) | 839 | return false; |
811 | { | ||
812 | return false; | ||
813 | } | ||
814 | } | 840 | } |
815 | return true; | ||
816 | } | 841 | } |
817 | #endregion | 842 | return true; |
843 | } | ||
844 | #endregion | ||
818 | 845 | ||
819 | #region EDIT PARCEL | 846 | #region EDIT PARCEL |
820 | public delegate bool CanEditParcel(LLUUID user, ILandObject parcel, Scene scene); | 847 | public delegate bool CanEditParcel(LLUUID user, ILandObject parcel, Scene scene); |
821 | private List<CanEditParcel> CanEditParcelCheckFunctions = new List<CanEditParcel>(); | 848 | private List<CanEditParcel> CanEditParcelCheckFunctions = new List<CanEditParcel>(); |
822 | 849 | ||
823 | public void addCheckEditParcel(CanEditParcel delegateFunc) | 850 | public void addCheckEditParcel(CanEditParcel delegateFunc) |
824 | { | 851 | { |
825 | if (!CanEditParcelCheckFunctions.Contains(delegateFunc)) | 852 | if (!CanEditParcelCheckFunctions.Contains(delegateFunc)) |
826 | CanEditParcelCheckFunctions.Add(delegateFunc); | 853 | CanEditParcelCheckFunctions.Add(delegateFunc); |
827 | } | 854 | } |
828 | public void removeCheckEditParcel(CanEditParcel delegateFunc) | 855 | |
829 | { | 856 | public void removeCheckEditParcel(CanEditParcel delegateFunc) |
830 | if (CanEditParcelCheckFunctions.Contains(delegateFunc)) | 857 | { |
831 | CanEditParcelCheckFunctions.Remove(delegateFunc); | 858 | if (CanEditParcelCheckFunctions.Contains(delegateFunc)) |
832 | } | 859 | CanEditParcelCheckFunctions.Remove(delegateFunc); |
860 | } | ||
833 | 861 | ||
834 | public bool ExternalChecksCanEditParcel(LLUUID user, ILandObject parcel) | 862 | public bool ExternalChecksCanEditParcel(LLUUID user, ILandObject parcel) |
863 | { | ||
864 | foreach (CanEditParcel check in CanEditParcelCheckFunctions) | ||
835 | { | 865 | { |
836 | foreach (CanEditParcel check in CanEditParcelCheckFunctions) | 866 | if (check(user, parcel, m_scene) == false) |
837 | { | 867 | { |
838 | if (check(user, parcel, m_scene) == false) | 868 | return false; |
839 | { | ||
840 | return false; | ||
841 | } | ||
842 | } | 869 | } |
843 | return true; | ||
844 | } | 870 | } |
845 | #endregion | 871 | return true; |
872 | } | ||
873 | #endregion | ||
846 | 874 | ||
847 | #region SELL PARCEL | 875 | #region SELL PARCEL |
848 | public delegate bool CanSellParcel(LLUUID user, ILandObject parcel, Scene scene); | 876 | public delegate bool CanSellParcel(LLUUID user, ILandObject parcel, Scene scene); |
849 | private List<CanSellParcel> CanSellParcelCheckFunctions = new List<CanSellParcel>(); | 877 | private List<CanSellParcel> CanSellParcelCheckFunctions = new List<CanSellParcel>(); |
850 | 878 | ||
851 | public void addCheckSellParcel(CanSellParcel delegateFunc) | 879 | public void addCheckSellParcel(CanSellParcel delegateFunc) |
852 | { | 880 | { |
853 | if (!CanSellParcelCheckFunctions.Contains(delegateFunc)) | 881 | if (!CanSellParcelCheckFunctions.Contains(delegateFunc)) |
854 | CanSellParcelCheckFunctions.Add(delegateFunc); | 882 | CanSellParcelCheckFunctions.Add(delegateFunc); |
855 | } | 883 | } |
856 | public void removeCheckSellParcel(CanSellParcel delegateFunc) | 884 | |
857 | { | 885 | public void removeCheckSellParcel(CanSellParcel delegateFunc) |
858 | if (CanSellParcelCheckFunctions.Contains(delegateFunc)) | 886 | { |
859 | CanSellParcelCheckFunctions.Remove(delegateFunc); | 887 | if (CanSellParcelCheckFunctions.Contains(delegateFunc)) |
860 | } | 888 | CanSellParcelCheckFunctions.Remove(delegateFunc); |
889 | } | ||
861 | 890 | ||
862 | public bool ExternalChecksCanSellParcel(LLUUID user, ILandObject parcel) | 891 | public bool ExternalChecksCanSellParcel(LLUUID user, ILandObject parcel) |
892 | { | ||
893 | foreach (CanSellParcel check in CanSellParcelCheckFunctions) | ||
863 | { | 894 | { |
864 | foreach (CanSellParcel check in CanSellParcelCheckFunctions) | 895 | if (check(user, parcel, m_scene) == false) |
865 | { | 896 | { |
866 | if (check(user, parcel, m_scene) == false) | 897 | return false; |
867 | { | ||
868 | return false; | ||
869 | } | ||
870 | } | 898 | } |
871 | return true; | ||
872 | } | 899 | } |
873 | #endregion | 900 | return true; |
901 | } | ||
902 | #endregion | ||
874 | 903 | ||
875 | #region ABANDON PARCEL | 904 | #region ABANDON PARCEL |
876 | public delegate bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene); | 905 | public delegate bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene); |
877 | private List<CanAbandonParcel> CanAbandonParcelCheckFunctions = new List<CanAbandonParcel>(); | 906 | private List<CanAbandonParcel> CanAbandonParcelCheckFunctions = new List<CanAbandonParcel>(); |
878 | 907 | ||
879 | public void addCheckAbandonParcel(CanAbandonParcel delegateFunc) | 908 | public void addCheckAbandonParcel(CanAbandonParcel delegateFunc) |
880 | { | 909 | { |
881 | if (!CanAbandonParcelCheckFunctions.Contains(delegateFunc)) | 910 | if (!CanAbandonParcelCheckFunctions.Contains(delegateFunc)) |
882 | CanAbandonParcelCheckFunctions.Add(delegateFunc); | 911 | CanAbandonParcelCheckFunctions.Add(delegateFunc); |
883 | } | 912 | } |
884 | public void removeCheckAbandonParcel(CanAbandonParcel delegateFunc) | ||
885 | { | ||
886 | if (CanAbandonParcelCheckFunctions.Contains(delegateFunc)) | ||
887 | CanAbandonParcelCheckFunctions.Remove(delegateFunc); | ||
888 | } | ||
889 | 913 | ||
890 | public bool ExternalChecksCanAbandonParcel(LLUUID user, ILandObject parcel) | 914 | public void removeCheckAbandonParcel(CanAbandonParcel delegateFunc) |
915 | { | ||
916 | if (CanAbandonParcelCheckFunctions.Contains(delegateFunc)) | ||
917 | CanAbandonParcelCheckFunctions.Remove(delegateFunc); | ||
918 | } | ||
919 | |||
920 | public bool ExternalChecksCanAbandonParcel(LLUUID user, ILandObject parcel) | ||
921 | { | ||
922 | foreach (CanAbandonParcel check in CanAbandonParcelCheckFunctions) | ||
891 | { | 923 | { |
892 | foreach (CanAbandonParcel check in CanAbandonParcelCheckFunctions) | 924 | if (check(user, parcel, m_scene) == false) |
893 | { | 925 | { |
894 | if (check(user, parcel, m_scene) == false) | 926 | return false; |
895 | { | ||
896 | return false; | ||
897 | } | ||
898 | } | 927 | } |
899 | return true; | ||
900 | } | 928 | } |
901 | #endregion | 929 | return true; |
930 | } | ||
931 | #endregion | ||
902 | 932 | ||
903 | public delegate bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene); | 933 | public delegate bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene); |
904 | private List<CanReclaimParcel> CanReclaimParcelCheckFunctions = new List<CanReclaimParcel>(); | 934 | private List<CanReclaimParcel> CanReclaimParcelCheckFunctions = new List<CanReclaimParcel>(); |
905 | 935 | ||
906 | public void addCheckReclaimParcel(CanReclaimParcel delegateFunc) | 936 | public void addCheckReclaimParcel(CanReclaimParcel delegateFunc) |
907 | { | 937 | { |
908 | if (!CanReclaimParcelCheckFunctions.Contains(delegateFunc)) | 938 | if (!CanReclaimParcelCheckFunctions.Contains(delegateFunc)) |
909 | CanReclaimParcelCheckFunctions.Add(delegateFunc); | 939 | CanReclaimParcelCheckFunctions.Add(delegateFunc); |
910 | } | 940 | } |
911 | public void removeCheckReclaimParcel(CanReclaimParcel delegateFunc) | ||
912 | { | ||
913 | if (CanReclaimParcelCheckFunctions.Contains(delegateFunc)) | ||
914 | CanReclaimParcelCheckFunctions.Remove(delegateFunc); | ||
915 | } | ||
916 | 941 | ||
917 | public bool ExternalChecksCanReclaimParcel(LLUUID user, ILandObject parcel) | 942 | public void removeCheckReclaimParcel(CanReclaimParcel delegateFunc) |
943 | { | ||
944 | if (CanReclaimParcelCheckFunctions.Contains(delegateFunc)) | ||
945 | CanReclaimParcelCheckFunctions.Remove(delegateFunc); | ||
946 | } | ||
947 | |||
948 | public bool ExternalChecksCanReclaimParcel(LLUUID user, ILandObject parcel) | ||
949 | { | ||
950 | foreach (CanReclaimParcel check in CanReclaimParcelCheckFunctions) | ||
918 | { | 951 | { |
919 | foreach (CanReclaimParcel check in CanReclaimParcelCheckFunctions) | 952 | if (check(user, parcel, m_scene) == false) |
920 | { | 953 | { |
921 | if (check(user, parcel, m_scene) == false) | 954 | return false; |
922 | { | ||
923 | return false; | ||
924 | } | ||
925 | } | 955 | } |
926 | return true; | ||
927 | } | 956 | } |
928 | public delegate bool CanBuyLand(LLUUID user, ILandObject parcel, Scene scene); | 957 | return true; |
929 | private List<CanBuyLand> CanBuyLandCheckFunctions = new List<CanBuyLand>(); | 958 | } |
959 | public delegate bool CanBuyLand(LLUUID user, ILandObject parcel, Scene scene); | ||
960 | private List<CanBuyLand> CanBuyLandCheckFunctions = new List<CanBuyLand>(); | ||
930 | 961 | ||
931 | public void addCheckCanBuyLand(CanBuyLand delegateFunc) | 962 | public void addCheckCanBuyLand(CanBuyLand delegateFunc) |
932 | { | 963 | { |
933 | if (!CanBuyLandCheckFunctions.Contains(delegateFunc)) | 964 | if (!CanBuyLandCheckFunctions.Contains(delegateFunc)) |
934 | CanBuyLandCheckFunctions.Add(delegateFunc); | 965 | CanBuyLandCheckFunctions.Add(delegateFunc); |
935 | } | 966 | } |
936 | public void removeCheckCanBuyLand(CanBuyLand delegateFunc) | ||
937 | { | ||
938 | if (CanBuyLandCheckFunctions.Contains(delegateFunc)) | ||
939 | CanBuyLandCheckFunctions.Remove(delegateFunc); | ||
940 | } | ||
941 | 967 | ||
942 | public bool ExternalChecksCanBuyLand(LLUUID user, ILandObject parcel) | 968 | public void removeCheckCanBuyLand(CanBuyLand delegateFunc) |
969 | { | ||
970 | if (CanBuyLandCheckFunctions.Contains(delegateFunc)) | ||
971 | CanBuyLandCheckFunctions.Remove(delegateFunc); | ||
972 | } | ||
973 | |||
974 | public bool ExternalChecksCanBuyLand(LLUUID user, ILandObject parcel) | ||
975 | { | ||
976 | foreach (CanBuyLand check in CanBuyLandCheckFunctions) | ||
943 | { | 977 | { |
944 | foreach (CanBuyLand check in CanBuyLandCheckFunctions) | 978 | if (check(user, parcel, m_scene) == false) |
945 | { | 979 | { |
946 | if (check(user, parcel, m_scene) == false) | 980 | return false; |
947 | { | ||
948 | return false; | ||
949 | } | ||
950 | } | 981 | } |
951 | return true; | ||
952 | } | 982 | } |
983 | return true; | ||
984 | } | ||
953 | 985 | ||
954 | public delegate bool CanLinkObject(LLUUID user, LLUUID objectID); | 986 | public delegate bool CanLinkObject(LLUUID user, LLUUID objectID); |
955 | private List<CanLinkObject> CanLinkObjectCheckFunctions = new List<CanLinkObject>(); | 987 | private List<CanLinkObject> CanLinkObjectCheckFunctions = new List<CanLinkObject>(); |
956 | 988 | ||
957 | public void addCheckCanLinkObject(CanLinkObject delegateFunc) | 989 | public void addCheckCanLinkObject(CanLinkObject delegateFunc) |
958 | { | 990 | { |
959 | if (!CanLinkObjectCheckFunctions.Contains(delegateFunc)) | 991 | if (!CanLinkObjectCheckFunctions.Contains(delegateFunc)) |
960 | CanLinkObjectCheckFunctions.Add(delegateFunc); | 992 | CanLinkObjectCheckFunctions.Add(delegateFunc); |
961 | } | 993 | } |
962 | public void removeCheckCanLinkObject(CanLinkObject delegateFunc) | 994 | |
963 | { | 995 | public void removeCheckCanLinkObject(CanLinkObject delegateFunc) |
964 | if (CanLinkObjectCheckFunctions.Contains(delegateFunc)) | 996 | { |
965 | CanLinkObjectCheckFunctions.Remove(delegateFunc); | 997 | if (CanLinkObjectCheckFunctions.Contains(delegateFunc)) |
966 | } | 998 | CanLinkObjectCheckFunctions.Remove(delegateFunc); |
999 | } | ||
967 | 1000 | ||
968 | public bool ExternalChecksCanLinkObject(LLUUID user, LLUUID objectID) | 1001 | public bool ExternalChecksCanLinkObject(LLUUID user, LLUUID objectID) |
969 | { | 1002 | { |
970 | foreach (CanLinkObject check in CanLinkObjectCheckFunctions) | 1003 | foreach (CanLinkObject check in CanLinkObjectCheckFunctions) |
971 | { | 1004 | { |
@@ -977,137 +1010,141 @@ namespace OpenSim.Region.Environment.Scenes | |||
977 | return true; | 1010 | return true; |
978 | } | 1011 | } |
979 | 1012 | ||
980 | public delegate bool CanDelinkObject(LLUUID user, LLUUID objectID); | 1013 | public delegate bool CanDelinkObject(LLUUID user, LLUUID objectID); |
981 | private List<CanDelinkObject> CanDelinkObjectCheckFunctions = new List<CanDelinkObject>(); | 1014 | private List<CanDelinkObject> CanDelinkObjectCheckFunctions = new List<CanDelinkObject>(); |
982 | 1015 | ||
983 | public void addCheckCanDelinkObject(CanDelinkObject delegateFunc) | 1016 | public void addCheckCanDelinkObject(CanDelinkObject delegateFunc) |
984 | { | 1017 | { |
985 | if (!CanDelinkObjectCheckFunctions.Contains(delegateFunc)) | 1018 | if (!CanDelinkObjectCheckFunctions.Contains(delegateFunc)) |
986 | CanDelinkObjectCheckFunctions.Add(delegateFunc); | 1019 | CanDelinkObjectCheckFunctions.Add(delegateFunc); |
987 | } | 1020 | } |
988 | public void removeCheckCanDelinkObject(CanDelinkObject delegateFunc) | 1021 | |
989 | { | 1022 | public void removeCheckCanDelinkObject(CanDelinkObject delegateFunc) |
990 | if (CanDelinkObjectCheckFunctions.Contains(delegateFunc)) | 1023 | { |
991 | CanDelinkObjectCheckFunctions.Remove(delegateFunc); | 1024 | if (CanDelinkObjectCheckFunctions.Contains(delegateFunc)) |
992 | } | 1025 | CanDelinkObjectCheckFunctions.Remove(delegateFunc); |
1026 | } | ||
993 | 1027 | ||
994 | public bool ExternalChecksCanDelinkObject(LLUUID user, LLUUID objectID) | 1028 | public bool ExternalChecksCanDelinkObject(LLUUID user, LLUUID objectID) |
1029 | { | ||
1030 | foreach (CanDelinkObject check in CanDelinkObjectCheckFunctions) | ||
995 | { | 1031 | { |
996 | foreach (CanDelinkObject check in CanDelinkObjectCheckFunctions) | 1032 | if (check(user, objectID) == false) |
997 | { | 1033 | { |
998 | if (check(user, objectID) == false) | 1034 | return false; |
999 | { | ||
1000 | return false; | ||
1001 | } | ||
1002 | } | 1035 | } |
1003 | return true; | ||
1004 | } | 1036 | } |
1037 | return true; | ||
1038 | } | ||
1005 | 1039 | ||
1006 | #endregion | 1040 | #endregion |
1007 | 1041 | ||
1008 | public delegate bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID); | 1042 | public delegate bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID); |
1009 | private List<CanCreateInventory> CanCreateInventoryCheckFunctions = new List<CanCreateInventory>(); | 1043 | private List<CanCreateInventory> CanCreateInventoryCheckFunctions = new List<CanCreateInventory>(); |
1010 | 1044 | ||
1011 | public void addCheckCanCreateInventory(CanCreateInventory delegateFunc) | 1045 | public void addCheckCanCreateInventory(CanCreateInventory delegateFunc) |
1012 | { | 1046 | { |
1013 | if (!CanCreateInventoryCheckFunctions.Contains(delegateFunc)) | 1047 | if (!CanCreateInventoryCheckFunctions.Contains(delegateFunc)) |
1014 | CanCreateInventoryCheckFunctions.Add(delegateFunc); | 1048 | CanCreateInventoryCheckFunctions.Add(delegateFunc); |
1015 | } | 1049 | } |
1016 | public void removeCheckCanCreateInventory(CanCreateInventory delegateFunc) | ||
1017 | { | ||
1018 | if (CanCreateInventoryCheckFunctions.Contains(delegateFunc)) | ||
1019 | CanCreateInventoryCheckFunctions.Remove(delegateFunc); | ||
1020 | } | ||
1021 | 1050 | ||
1022 | public bool ExternalChecksCanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) | 1051 | public void removeCheckCanCreateInventory(CanCreateInventory delegateFunc) |
1052 | { | ||
1053 | if (CanCreateInventoryCheckFunctions.Contains(delegateFunc)) | ||
1054 | CanCreateInventoryCheckFunctions.Remove(delegateFunc); | ||
1055 | } | ||
1056 | |||
1057 | public bool ExternalChecksCanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) | ||
1058 | { | ||
1059 | foreach (CanCreateInventory check in CanCreateInventoryCheckFunctions) | ||
1023 | { | 1060 | { |
1024 | foreach (CanCreateInventory check in CanCreateInventoryCheckFunctions) | 1061 | if (check(invType, objectID, userID) == false) |
1025 | { | 1062 | { |
1026 | if (check(invType, objectID, userID) == false) | 1063 | return false; |
1027 | { | ||
1028 | return false; | ||
1029 | } | ||
1030 | } | 1064 | } |
1031 | return true; | ||
1032 | } | 1065 | } |
1066 | return true; | ||
1067 | } | ||
1033 | 1068 | ||
1034 | public delegate bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); | 1069 | public delegate bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); |
1035 | private List<CanCopyInventory> CanCopyInventoryCheckFunctions = new List<CanCopyInventory>(); | 1070 | private List<CanCopyInventory> CanCopyInventoryCheckFunctions = new List<CanCopyInventory>(); |
1036 | 1071 | ||
1037 | public void addCheckCanCopyInventory(CanCopyInventory delegateFunc) | 1072 | public void addCheckCanCopyInventory(CanCopyInventory delegateFunc) |
1038 | { | 1073 | { |
1039 | if (!CanCopyInventoryCheckFunctions.Contains(delegateFunc)) | 1074 | if (!CanCopyInventoryCheckFunctions.Contains(delegateFunc)) |
1040 | CanCopyInventoryCheckFunctions.Add(delegateFunc); | 1075 | CanCopyInventoryCheckFunctions.Add(delegateFunc); |
1041 | } | 1076 | } |
1042 | public void removeCheckCanCopyInventory(CanCopyInventory delegateFunc) | 1077 | |
1043 | { | 1078 | public void removeCheckCanCopyInventory(CanCopyInventory delegateFunc) |
1044 | if (CanCopyInventoryCheckFunctions.Contains(delegateFunc)) | 1079 | { |
1045 | CanCopyInventoryCheckFunctions.Remove(delegateFunc); | 1080 | if (CanCopyInventoryCheckFunctions.Contains(delegateFunc)) |
1046 | } | 1081 | CanCopyInventoryCheckFunctions.Remove(delegateFunc); |
1082 | } | ||
1047 | 1083 | ||
1048 | public bool ExternalChecksCanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) | 1084 | public bool ExternalChecksCanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) |
1085 | { | ||
1086 | foreach (CanCopyInventory check in CanCopyInventoryCheckFunctions) | ||
1049 | { | 1087 | { |
1050 | foreach (CanCopyInventory check in CanCopyInventoryCheckFunctions) | 1088 | if (check(itemID, objectID, userID) == false) |
1051 | { | 1089 | { |
1052 | if (check(itemID, objectID, userID) == false) | 1090 | return false; |
1053 | { | ||
1054 | return false; | ||
1055 | } | ||
1056 | } | 1091 | } |
1057 | return true; | ||
1058 | } | 1092 | } |
1093 | return true; | ||
1094 | } | ||
1059 | 1095 | ||
1060 | public delegate bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); | 1096 | public delegate bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); |
1061 | private List<CanDeleteInventory> CanDeleteInventoryCheckFunctions = new List<CanDeleteInventory>(); | 1097 | private List<CanDeleteInventory> CanDeleteInventoryCheckFunctions = new List<CanDeleteInventory>(); |
1062 | 1098 | ||
1063 | public void addCheckCanDeleteInventory(CanDeleteInventory delegateFunc) | 1099 | public void addCheckCanDeleteInventory(CanDeleteInventory delegateFunc) |
1064 | { | 1100 | { |
1065 | if (!CanDeleteInventoryCheckFunctions.Contains(delegateFunc)) | 1101 | if (!CanDeleteInventoryCheckFunctions.Contains(delegateFunc)) |
1066 | CanDeleteInventoryCheckFunctions.Add(delegateFunc); | 1102 | CanDeleteInventoryCheckFunctions.Add(delegateFunc); |
1067 | } | 1103 | } |
1068 | public void removeCheckCanDeleteInventory(CanDeleteInventory delegateFunc) | ||
1069 | { | ||
1070 | if (CanDeleteInventoryCheckFunctions.Contains(delegateFunc)) | ||
1071 | CanDeleteInventoryCheckFunctions.Remove(delegateFunc); | ||
1072 | } | ||
1073 | 1104 | ||
1074 | public bool ExternalChecksCanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) | 1105 | public void removeCheckCanDeleteInventory(CanDeleteInventory delegateFunc) |
1106 | { | ||
1107 | if (CanDeleteInventoryCheckFunctions.Contains(delegateFunc)) | ||
1108 | CanDeleteInventoryCheckFunctions.Remove(delegateFunc); | ||
1109 | } | ||
1110 | |||
1111 | public bool ExternalChecksCanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) | ||
1112 | { | ||
1113 | foreach (CanDeleteInventory check in CanDeleteInventoryCheckFunctions) | ||
1075 | { | 1114 | { |
1076 | foreach (CanDeleteInventory check in CanDeleteInventoryCheckFunctions) | 1115 | if (check(itemID, objectID, userID) == false) |
1077 | { | 1116 | { |
1078 | if (check(itemID, objectID, userID) == false) | 1117 | return false; |
1079 | { | ||
1080 | return false; | ||
1081 | } | ||
1082 | } | 1118 | } |
1083 | return true; | ||
1084 | } | 1119 | } |
1120 | return true; | ||
1121 | } | ||
1085 | 1122 | ||
1086 | public delegate bool CanTeleport(LLUUID userID); | 1123 | public delegate bool CanTeleport(LLUUID userID); |
1087 | private List<CanTeleport> CanTeleportCheckFunctions = new List<CanTeleport>(); | 1124 | private List<CanTeleport> CanTeleportCheckFunctions = new List<CanTeleport>(); |
1088 | 1125 | ||
1089 | public void addCheckCanTeleport(CanTeleport delegateFunc) | 1126 | public void addCheckCanTeleport(CanTeleport delegateFunc) |
1090 | { | 1127 | { |
1091 | if (!CanTeleportCheckFunctions.Contains(delegateFunc)) | 1128 | if (!CanTeleportCheckFunctions.Contains(delegateFunc)) |
1092 | CanTeleportCheckFunctions.Add(delegateFunc); | 1129 | CanTeleportCheckFunctions.Add(delegateFunc); |
1093 | } | 1130 | } |
1094 | public void removeCheckCanTeleport(CanTeleport delegateFunc) | ||
1095 | { | ||
1096 | if (CanTeleportCheckFunctions.Contains(delegateFunc)) | ||
1097 | CanTeleportCheckFunctions.Remove(delegateFunc); | ||
1098 | } | ||
1099 | 1131 | ||
1100 | public bool ExternalChecksCanTeleport(LLUUID userID) | 1132 | public void removeCheckCanTeleport(CanTeleport delegateFunc) |
1133 | { | ||
1134 | if (CanTeleportCheckFunctions.Contains(delegateFunc)) | ||
1135 | CanTeleportCheckFunctions.Remove(delegateFunc); | ||
1136 | } | ||
1137 | |||
1138 | public bool ExternalChecksCanTeleport(LLUUID userID) | ||
1139 | { | ||
1140 | foreach (CanTeleport check in CanTeleportCheckFunctions) | ||
1101 | { | 1141 | { |
1102 | foreach (CanTeleport check in CanTeleportCheckFunctions) | 1142 | if (check(userID) == false) |
1103 | { | 1143 | { |
1104 | if (check(userID) == false) | 1144 | return false; |
1105 | { | ||
1106 | return false; | ||
1107 | } | ||
1108 | } | 1145 | } |
1109 | return true; | ||
1110 | } | 1146 | } |
1147 | return true; | ||
1148 | } | ||
1111 | } | 1149 | } |
1112 | } | 1150 | } |
1113 | |||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index cc4891f..032d673 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
40 | 40 | ||
41 | /// <summary> | 41 | /// <summary> |
42 | /// Force all task inventories of prims in the scene object to persist | 42 | /// Force all task inventories of prims in the scene object to persist |
43 | /// </summary> | 43 | /// </summary> |
44 | public void ForceInventoryPersistence() | 44 | public void ForceInventoryPersistence() |
45 | { | 45 | { |
@@ -49,9 +49,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
49 | { | 49 | { |
50 | part.ForceInventoryPersistence(); | 50 | part.ForceInventoryPersistence(); |
51 | } | 51 | } |
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Start the scripts contained in all the prims in this group. | 56 | /// Start the scripts contained in all the prims in this group. |
57 | /// </summary> | 57 | /// </summary> |
@@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
161 | // taskItem.SalePrice = item.SalePrice; | 161 | // taskItem.SalePrice = item.SalePrice; |
162 | // taskItem.SaleType = item.SaleType; | 162 | // taskItem.SaleType = item.SaleType; |
163 | taskItem.CreationDate = (uint)item.CreationDate; | 163 | taskItem.CreationDate = (uint)item.CreationDate; |
164 | 164 | ||
165 | part.AddInventoryItem(taskItem); | 165 | part.AddInventoryItem(taskItem); |
166 | 166 | ||
167 | return true; | 167 | return true; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 2a1b8c5..9c3d6a7 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
94 | /// since the group's last persistent backup | 94 | /// since the group's last persistent backup |
95 | /// </summary> | 95 | /// </summary> |
96 | public bool HasGroupChanged = false; | 96 | public bool HasGroupChanged = false; |
97 | 97 | ||
98 | public float scriptScore = 0f; | 98 | public float scriptScore = 0f; |
99 | 99 | ||
100 | private LLVector3 lastPhysGroupPos; | 100 | private LLVector3 lastPhysGroupPos; |
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
115 | private bool m_scriptListens_notAtTarget = false; | 115 | private bool m_scriptListens_notAtTarget = false; |
116 | 116 | ||
117 | #region Properties | 117 | #region Properties |
118 | 118 | ||
119 | /// <summary> | 119 | /// <summary> |
120 | /// The name of an object grouping is always the same as its root part | 120 | /// The name of an object grouping is always the same as its root part |
121 | /// </summary> | 121 | /// </summary> |
@@ -123,7 +123,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
123 | { | 123 | { |
124 | get { return RootPart.Name; } | 124 | get { return RootPart.Name; } |
125 | set { RootPart.Name = value; } | 125 | set { RootPart.Name = value; } |
126 | } | 126 | } |
127 | 127 | ||
128 | /// <summary> | 128 | /// <summary> |
129 | /// Added because the Parcel code seems to use it | 129 | /// Added because the Parcel code seems to use it |
@@ -445,13 +445,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
445 | } | 445 | } |
446 | more = !reader.EOF; | 446 | more = !reader.EOF; |
447 | } | 447 | } |
448 | 448 | ||
449 | reader.Close(); | 449 | reader.Close(); |
450 | sr.Close(); | 450 | sr.Close(); |
451 | 451 | ||
452 | UpdateParentIDs(); | 452 | UpdateParentIDs(); |
453 | } | 453 | } |
454 | 454 | ||
455 | /// <summary> | 455 | /// <summary> |
456 | /// | 456 | /// |
457 | /// </summary> | 457 | /// </summary> |
@@ -468,14 +468,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
468 | newPart.LinkNum = 0; | 468 | newPart.LinkNum = 0; |
469 | m_parts.Add(newPart.UUID, newPart); | 469 | m_parts.Add(newPart.UUID, newPart); |
470 | SetPartAsRoot(newPart); | 470 | SetPartAsRoot(newPart); |
471 | 471 | ||
472 | // one of these is a proxy. | 472 | // one of these is a proxy. |
473 | if (shape.PCode != (byte)PCode.None && shape.PCode != (byte)PCode.ParticleSystem) | 473 | if (shape.PCode != (byte)PCode.None && shape.PCode != (byte)PCode.ParticleSystem) |
474 | AttachToBackup(); | 474 | AttachToBackup(); |
475 | 475 | ||
476 | //ApplyPhysics(scene.m_physicalPrim); | 476 | //ApplyPhysics(scene.m_physicalPrim); |
477 | } | 477 | } |
478 | 478 | ||
479 | /// <summary> | 479 | /// <summary> |
480 | /// | 480 | /// |
481 | /// </summary> | 481 | /// </summary> |
@@ -754,7 +754,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
754 | m_rootPart.ScheduleFullUpdate(); | 754 | m_rootPart.ScheduleFullUpdate(); |
755 | m_rootPart.ClearUndoState(); | 755 | m_rootPart.ClearUndoState(); |
756 | } | 756 | } |
757 | 757 | ||
758 | public void DetachToInventoryPrep() | 758 | public void DetachToInventoryPrep() |
759 | { | 759 | { |
760 | ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); | 760 | ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); |
@@ -873,11 +873,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
873 | return m_scene.MaxUndoCount; | 873 | return m_scene.MaxUndoCount; |
874 | return 5; | 874 | return 5; |
875 | } | 875 | } |
876 | 876 | ||
877 | // justincc: I don't believe this hack is needed any longer, especially since the physics | 877 | // justincc: I don't believe this hack is needed any longer, especially since the physics |
878 | // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false | 878 | // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false |
879 | // this method was preventing proper reload of scene objects. | 879 | // this method was preventing proper reload of scene objects. |
880 | // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects | 880 | // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects |
881 | // at region startup | 881 | // at region startup |
882 | public void ResetChildPrimPhysicsPositions() | 882 | public void ResetChildPrimPhysicsPositions() |
883 | { | 883 | { |
@@ -926,20 +926,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
926 | /// </summary> | 926 | /// </summary> |
927 | public void DeleteGroup() | 927 | public void DeleteGroup() |
928 | { | 928 | { |
929 | // We need to keep track of this state in case this group is still queued for backup. | 929 | // We need to keep track of this state in case this group is still queued for backup. |
930 | // FIXME: This is a poor temporary solution, since it still leaves plenty of scope for race | 930 | // FIXME: This is a poor temporary solution, since it still leaves plenty of scope for race |
931 | // conditions where a user deletes an entity while it is being stored. Really, the update | 931 | // conditions where a user deletes an entity while it is being stored. Really, the update |
932 | // code needs a redesign. | 932 | // code needs a redesign. |
933 | m_isDeleted = true; | 933 | m_isDeleted = true; |
934 | 934 | ||
935 | DetachFromBackup(this); | 935 | DetachFromBackup(this); |
936 | 936 | ||
937 | lock (m_parts) | 937 | lock (m_parts) |
938 | { | 938 | { |
939 | foreach (SceneObjectPart part in m_parts.Values) | 939 | foreach (SceneObjectPart part in m_parts.Values) |
940 | { | 940 | { |
941 | part.RemoveScriptInstances(); | 941 | part.RemoveScriptInstances(); |
942 | 942 | ||
943 | List<ScenePresence> avatars = Scene.GetScenePresences(); | 943 | List<ScenePresence> avatars = Scene.GetScenePresences(); |
944 | for (int i = 0; i < avatars.Count; i++) | 944 | for (int i = 0; i < avatars.Count; i++) |
945 | { | 945 | { |
@@ -951,12 +951,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
951 | avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); | 951 | avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); |
952 | } | 952 | } |
953 | } | 953 | } |
954 | 954 | ||
955 | m_rootPart = null; | 955 | m_rootPart = null; |
956 | m_parts.Clear(); | 956 | m_parts.Clear(); |
957 | } | 957 | } |
958 | } | 958 | } |
959 | 959 | ||
960 | public void FakeDeleteGroup() | 960 | public void FakeDeleteGroup() |
961 | { | 961 | { |
962 | foreach (SceneObjectPart part in m_parts.Values) | 962 | foreach (SceneObjectPart part in m_parts.Values) |
@@ -1034,7 +1034,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1034 | lock (m_targets) | 1034 | lock (m_targets) |
1035 | m_targets.Clear(); | 1035 | m_targets.Clear(); |
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | ScheduleGroupForFullUpdate(); | 1038 | ScheduleGroupForFullUpdate(); |
1039 | } | 1039 | } |
1040 | 1040 | ||
@@ -1067,7 +1067,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1067 | { | 1067 | { |
1068 | part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_physicalPrim); | 1068 | part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_physicalPrim); |
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | // Hack to get the physics scene geometries in the right spot | 1071 | // Hack to get the physics scene geometries in the right spot |
1072 | ResetChildPrimPhysicsPositions(); | 1072 | ResetChildPrimPhysicsPositions(); |
1073 | } | 1073 | } |
@@ -1102,14 +1102,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1102 | /// </summary> | 1102 | /// </summary> |
1103 | /// <param name="datastore"></param> | 1103 | /// <param name="datastore"></param> |
1104 | public void ProcessBackup(IRegionDataStore datastore) | 1104 | public void ProcessBackup(IRegionDataStore datastore) |
1105 | { | 1105 | { |
1106 | if (HasGroupChanged) | 1106 | if (HasGroupChanged) |
1107 | { | 1107 | { |
1108 | // don't backup while it's selected or you're asking for changes mid stream. | 1108 | // don't backup while it's selected or you're asking for changes mid stream. |
1109 | if ((!IsSelected) && (RootPart != null)) | 1109 | if ((!IsSelected) && (RootPart != null)) |
1110 | { | 1110 | { |
1111 | m_log.InfoFormat( | 1111 | m_log.InfoFormat( |
1112 | "[SCENE]: Storing object {0}, {1} in {2}", | 1112 | "[SCENE]: Storing object {0}, {1} in {2}", |
1113 | Name, UUID, m_scene.RegionInfo.RegionName); | 1113 | Name, UUID, m_scene.RegionInfo.RegionName); |
1114 | 1114 | ||
1115 | SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); | 1115 | SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); |
@@ -1236,7 +1236,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1236 | 1236 | ||
1237 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); | 1237 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); |
1238 | } | 1238 | } |
1239 | 1239 | ||
1240 | // Now we've made a copy that replaces this one, we need to | 1240 | // Now we've made a copy that replaces this one, we need to |
1241 | // switch the owner to the person who did the copying | 1241 | // switch the owner to the person who did the copying |
1242 | // Second Life copies an object and duplicates the first one in it's place | 1242 | // Second Life copies an object and duplicates the first one in it's place |
@@ -1267,7 +1267,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1267 | dupe.UpdateParentIDs(); | 1267 | dupe.UpdateParentIDs(); |
1268 | dupe.HasGroupChanged = true; | 1268 | dupe.HasGroupChanged = true; |
1269 | dupe.AttachToBackup(); | 1269 | dupe.AttachToBackup(); |
1270 | 1270 | ||
1271 | ScheduleGroupForFullUpdate(); | 1271 | ScheduleGroupForFullUpdate(); |
1272 | } | 1272 | } |
1273 | 1273 | ||
@@ -1673,7 +1673,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1673 | { | 1673 | { |
1674 | return true; | 1674 | return true; |
1675 | } | 1675 | } |
1676 | 1676 | ||
1677 | return false; | 1677 | return false; |
1678 | } | 1678 | } |
1679 | 1679 | ||
@@ -1695,7 +1695,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1695 | } | 1695 | } |
1696 | } | 1696 | } |
1697 | } | 1697 | } |
1698 | 1698 | ||
1699 | return false; | 1699 | return false; |
1700 | } | 1700 | } |
1701 | 1701 | ||
@@ -2042,7 +2042,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2042 | public void UpdatePrimFlags(uint localID, ushort type, bool inUse, byte[] data) | 2042 | public void UpdatePrimFlags(uint localID, ushort type, bool inUse, byte[] data) |
2043 | { | 2043 | { |
2044 | SceneObjectPart selectionPart = GetChildPart(localID); | 2044 | SceneObjectPart selectionPart = GetChildPart(localID); |
2045 | 2045 | ||
2046 | if (selectionPart != null) | 2046 | if (selectionPart != null) |
2047 | { | 2047 | { |
2048 | lock (m_parts) | 2048 | lock (m_parts) |
@@ -2164,7 +2164,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2164 | m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); | 2164 | m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); |
2165 | } | 2165 | } |
2166 | //if (part.UUID != m_rootPart.UUID) | 2166 | //if (part.UUID != m_rootPart.UUID) |
2167 | 2167 | ||
2168 | HasGroupChanged = true; | 2168 | HasGroupChanged = true; |
2169 | ScheduleGroupForFullUpdate(); | 2169 | ScheduleGroupForFullUpdate(); |
2170 | 2170 | ||
@@ -2332,10 +2332,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2332 | } | 2332 | } |
2333 | 2333 | ||
2334 | AbsolutePosition = pos; | 2334 | AbsolutePosition = pos; |
2335 | 2335 | ||
2336 | HasGroupChanged = true; | 2336 | HasGroupChanged = true; |
2337 | } | 2337 | } |
2338 | 2338 | ||
2339 | //we need to do a terse update even if the move wasn't allowed | 2339 | //we need to do a terse update even if the move wasn't allowed |
2340 | // so that the position is reset in the client (the object snaps back) | 2340 | // so that the position is reset in the client (the object snaps back) |
2341 | ScheduleGroupForTerseUpdate(); | 2341 | ScheduleGroupForTerseUpdate(); |
@@ -2349,7 +2349,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2349 | public void UpdateSinglePosition(LLVector3 pos, uint localID) | 2349 | public void UpdateSinglePosition(LLVector3 pos, uint localID) |
2350 | { | 2350 | { |
2351 | SceneObjectPart part = GetChildPart(localID); | 2351 | SceneObjectPart part = GetChildPart(localID); |
2352 | 2352 | ||
2353 | if (part != null) | 2353 | if (part != null) |
2354 | { | 2354 | { |
2355 | if (part.UUID == m_rootPart.UUID) | 2355 | if (part.UUID == m_rootPart.UUID) |
@@ -2360,7 +2360,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2360 | { | 2360 | { |
2361 | part.UpdateOffSet(pos); | 2361 | part.UpdateOffSet(pos); |
2362 | } | 2362 | } |
2363 | 2363 | ||
2364 | HasGroupChanged = true; | 2364 | HasGroupChanged = true; |
2365 | } | 2365 | } |
2366 | } | 2366 | } |
@@ -2398,7 +2398,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2398 | } | 2398 | } |
2399 | 2399 | ||
2400 | AbsolutePosition = newPos; | 2400 | AbsolutePosition = newPos; |
2401 | 2401 | ||
2402 | HasGroupChanged = true; | 2402 | HasGroupChanged = true; |
2403 | ScheduleGroupForTerseUpdate(); | 2403 | ScheduleGroupForTerseUpdate(); |
2404 | } | 2404 | } |
@@ -2426,7 +2426,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2426 | m_rootPart.RotationOffset.Z); | 2426 | m_rootPart.RotationOffset.Z); |
2427 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); | 2427 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); |
2428 | } | 2428 | } |
2429 | 2429 | ||
2430 | HasGroupChanged = true; | 2430 | HasGroupChanged = true; |
2431 | ScheduleGroupForTerseUpdate(); | 2431 | ScheduleGroupForTerseUpdate(); |
2432 | } | 2432 | } |
@@ -2447,7 +2447,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2447 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); | 2447 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); |
2448 | } | 2448 | } |
2449 | AbsolutePosition = pos; | 2449 | AbsolutePosition = pos; |
2450 | 2450 | ||
2451 | HasGroupChanged = true; | 2451 | HasGroupChanged = true; |
2452 | ScheduleGroupForTerseUpdate(); | 2452 | ScheduleGroupForTerseUpdate(); |
2453 | } | 2453 | } |
@@ -2684,7 +2684,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2684 | } | 2684 | } |
2685 | } | 2685 | } |
2686 | } | 2686 | } |
2687 | 2687 | ||
2688 | /// <summary> | 2688 | /// <summary> |
2689 | /// Set the user group to which this scene object belongs. | 2689 | /// Set the user group to which this scene object belongs. |
2690 | /// </summary> | 2690 | /// </summary> |
@@ -2698,10 +2698,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2698 | { | 2698 | { |
2699 | part.SetGroup(GroupID, client); | 2699 | part.SetGroup(GroupID, client); |
2700 | } | 2700 | } |
2701 | 2701 | ||
2702 | HasGroupChanged = true; | 2702 | HasGroupChanged = true; |
2703 | } | 2703 | } |
2704 | 2704 | ||
2705 | ScheduleGroupForFullUpdate(); | 2705 | ScheduleGroupForFullUpdate(); |
2706 | } | 2706 | } |
2707 | 2707 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index 480c030..0ac20e2 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
43 | 43 | ||
44 | private string m_inventoryFileName = String.Empty; | 44 | private string m_inventoryFileName = String.Empty; |
45 | private int m_inventoryFileNameSerial = 0; | 45 | private int m_inventoryFileNameSerial = 0; |
46 | 46 | ||
47 | /// <summary> | 47 | /// <summary> |
48 | /// Serial count for inventory file , used to tell if inventory has changed | 48 | /// Serial count for inventory file , used to tell if inventory has changed |
49 | /// no need for this to be part of Database backup | 49 | /// no need for this to be part of Database backup |
@@ -53,13 +53,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
53 | /// <summary> | 53 | /// <summary> |
54 | /// Holds in memory prim inventory | 54 | /// Holds in memory prim inventory |
55 | /// </summary> | 55 | /// </summary> |
56 | protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); | 56 | protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// Tracks whether inventory has changed since the last persistent backup | 59 | /// Tracks whether inventory has changed since the last persistent backup |
60 | /// </summary> | 60 | /// </summary> |
61 | protected bool HasInventoryChanged; | 61 | protected bool HasInventoryChanged; |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// Force the task inventory of this prim to persist at the next update sweep | 64 | /// Force the task inventory of this prim to persist at the next update sweep |
65 | /// </summary> | 65 | /// </summary> |
@@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
308 | { | 308 | { |
309 | if (i.InvType == (int)InventoryType.LSL) | 309 | if (i.InvType == (int)InventoryType.LSL) |
310 | RemoveScriptInstance(i.ItemID); | 310 | RemoveScriptInstance(i.ItemID); |
311 | 311 | ||
312 | RemoveInventoryItem(i.ItemID); | 312 | RemoveInventoryItem(i.ItemID); |
313 | break; | 313 | break; |
314 | } | 314 | } |
@@ -316,7 +316,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
316 | 316 | ||
317 | AddInventoryItem(item.Name, item); | 317 | AddInventoryItem(item.Name, item); |
318 | } | 318 | } |
319 | 319 | ||
320 | /// <summary> | 320 | /// <summary> |
321 | /// Add an item to this prim's inventory. | 321 | /// Add an item to this prim's inventory. |
322 | /// </summary> | 322 | /// </summary> |
@@ -329,7 +329,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
329 | { | 329 | { |
330 | item.ParentID = UUID; | 330 | item.ParentID = UUID; |
331 | item.ParentPartID = UUID; | 331 | item.ParentPartID = UUID; |
332 | 332 | ||
333 | lock (m_taskInventory) | 333 | lock (m_taskInventory) |
334 | { | 334 | { |
335 | m_taskInventory.Add(item.ItemID, item); | 335 | m_taskInventory.Add(item.ItemID, item); |
@@ -339,7 +339,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
339 | m_inventorySerial++; | 339 | m_inventorySerial++; |
340 | //m_inventorySerial += 2; | 340 | //m_inventorySerial += 2; |
341 | HasInventoryChanged = true; | 341 | HasInventoryChanged = true; |
342 | ParentGroup.HasGroupChanged = true; | 342 | ParentGroup.HasGroupChanged = true; |
343 | } | 343 | } |
344 | 344 | ||
345 | /// <summary> | 345 | /// <summary> |
@@ -369,10 +369,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
369 | /// <param name="itemID"></param> | 369 | /// <param name="itemID"></param> |
370 | /// <returns>null if the item does not exist</returns> | 370 | /// <returns>null if the item does not exist</returns> |
371 | public TaskInventoryItem GetInventoryItem(LLUUID itemId) | 371 | public TaskInventoryItem GetInventoryItem(LLUUID itemId) |
372 | { | 372 | { |
373 | TaskInventoryItem item; | 373 | TaskInventoryItem item; |
374 | m_taskInventory.TryGetValue(itemId, out item); | 374 | m_taskInventory.TryGetValue(itemId, out item); |
375 | 375 | ||
376 | return item; | 376 | return item; |
377 | } | 377 | } |
378 | 378 | ||
@@ -450,12 +450,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
450 | } | 450 | } |
451 | 451 | ||
452 | } | 452 | } |
453 | 453 | ||
454 | if (scriptcount <= 0) | 454 | if (scriptcount <= 0) |
455 | { | 455 | { |
456 | RemFlag(LLObject.ObjectFlags.Scripted); | 456 | RemFlag(LLObject.ObjectFlags.Scripted); |
457 | } | 457 | } |
458 | 458 | ||
459 | ScheduleFullUpdate(); | 459 | ScheduleFullUpdate(); |
460 | 460 | ||
461 | return type; | 461 | return type; |
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
603 | public void ProcessInventoryBackup(IRegionDataStore datastore) | 603 | public void ProcessInventoryBackup(IRegionDataStore datastore) |
604 | { | 604 | { |
605 | if (HasInventoryChanged) | 605 | if (HasInventoryChanged) |
606 | { | 606 | { |
607 | lock (TaskInventory) | 607 | lock (TaskInventory) |
608 | { | 608 | { |
609 | datastore.StorePrimInventory(UUID, TaskInventory.Values); | 609 | datastore.StorePrimInventory(UUID, TaskInventory.Values); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 1432912..517114f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
141 | public uint AttachmentPoint = (byte)0; | 141 | public uint AttachmentPoint = (byte)0; |
142 | [XmlIgnore] | 142 | [XmlIgnore] |
143 | public PhysicsVector RotationAxis = new PhysicsVector(1f,1f,1f); | 143 | public PhysicsVector RotationAxis = new PhysicsVector(1f,1f,1f); |
144 | 144 | ||
145 | [XmlIgnore] | 145 | [XmlIgnore] |
146 | public bool Undoing = false; | 146 | public bool Undoing = false; |
147 | 147 | ||
@@ -196,11 +196,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
196 | protected LLVector3 m_velocity; | 196 | protected LLVector3 m_velocity; |
197 | 197 | ||
198 | // TODO: Those have to be changed into persistent properties at some later point, | 198 | // TODO: Those have to be changed into persistent properties at some later point, |
199 | // or sit-camera on vehicles will break on sim-crossing. | 199 | // or sit-camera on vehicles will break on sim-crossing. |
200 | private LLVector3 m_cameraEyeOffset = new LLVector3(0.0f, 0.0f, 0.0f); | 200 | private LLVector3 m_cameraEyeOffset = new LLVector3(0.0f, 0.0f, 0.0f); |
201 | private LLVector3 m_cameraAtOffset = new LLVector3(0.0f, 0.0f, 0.0f); | 201 | private LLVector3 m_cameraAtOffset = new LLVector3(0.0f, 0.0f, 0.0f); |
202 | private bool m_forceMouselook = false; | 202 | private bool m_forceMouselook = false; |
203 | 203 | ||
204 | #endregion Fields | 204 | #endregion Fields |
205 | 205 | ||
206 | #region Constructors | 206 | #region Constructors |
@@ -352,13 +352,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
352 | private uint _everyoneMask = (uint)PermissionMask.None; | 352 | private uint _everyoneMask = (uint)PermissionMask.None; |
353 | private uint _nextOwnerMask = (uint)PermissionMask.All; | 353 | private uint _nextOwnerMask = (uint)PermissionMask.All; |
354 | private LLObject.ObjectFlags _flags = LLObject.ObjectFlags.None; | 354 | private LLObject.ObjectFlags _flags = LLObject.ObjectFlags.None; |
355 | 355 | ||
356 | public LLUUID CreatorID { | 356 | public LLUUID CreatorID { |
357 | get | 357 | get |
358 | { | 358 | { |
359 | return _creatorID; | 359 | return _creatorID; |
360 | } | 360 | } |
361 | set | 361 | set |
362 | { | 362 | { |
363 | _creatorID = value; | 363 | _creatorID = value; |
364 | } | 364 | } |
@@ -390,26 +390,26 @@ namespace OpenSim.Region.Environment.Scenes | |||
390 | { | 390 | { |
391 | get { return (uint)_flags; } | 391 | get { return (uint)_flags; } |
392 | set { _flags = (LLObject.ObjectFlags)value; } | 392 | set { _flags = (LLObject.ObjectFlags)value; } |
393 | } | 393 | } |
394 | 394 | ||
395 | public LLUUID UUID | 395 | public LLUUID UUID |
396 | { | 396 | { |
397 | get { return m_uuid; } | 397 | get { return m_uuid; } |
398 | set { m_uuid = value; } | 398 | set { m_uuid = value; } |
399 | } | 399 | } |
400 | 400 | ||
401 | public uint LocalId | 401 | public uint LocalId |
402 | { | 402 | { |
403 | get { return m_localId; } | 403 | get { return m_localId; } |
404 | set { m_localId = value; } | 404 | set { m_localId = value; } |
405 | } | 405 | } |
406 | 406 | ||
407 | public virtual string Name | 407 | public virtual string Name |
408 | { | 408 | { |
409 | get { return m_name; } | 409 | get { return m_name; } |
410 | set { m_name = value; } | 410 | set { m_name = value; } |
411 | } | 411 | } |
412 | 412 | ||
413 | public byte Material | 413 | public byte Material |
414 | { | 414 | { |
415 | get { return (byte) m_material; } | 415 | get { return (byte) m_material; } |
@@ -607,13 +607,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
607 | /// <summary></summary> | 607 | /// <summary></summary> |
608 | public LLVector3 AngularVelocity | 608 | public LLVector3 AngularVelocity |
609 | { | 609 | { |
610 | get | 610 | get |
611 | { | 611 | { |
612 | if ((PhysActor != null) && PhysActor.IsPhysical) | 612 | if ((PhysActor != null) && PhysActor.IsPhysical) |
613 | { | 613 | { |
614 | m_angularVelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(), 0); | 614 | m_angularVelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(), 0); |
615 | } | 615 | } |
616 | return m_angularVelocity; | 616 | return m_angularVelocity; |
617 | } | 617 | } |
618 | set { m_angularVelocity = value; } | 618 | set { m_angularVelocity = value; } |
619 | } | 619 | } |
@@ -631,7 +631,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
631 | get { return m_description; } | 631 | get { return m_description; } |
632 | set { m_description = value; } | 632 | set { m_description = value; } |
633 | } | 633 | } |
634 | 634 | ||
635 | public Color Color | 635 | public Color Color |
636 | { | 636 | { |
637 | get { return m_color; } | 637 | get { return m_color; } |
@@ -702,7 +702,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
702 | // set of attributes on shape change. For instance, | 702 | // set of attributes on shape change. For instance, |
703 | // changing the lighting on a shape shouldn't cause | 703 | // changing the lighting on a shape shouldn't cause |
704 | // this. | 704 | // this. |
705 | if (m_shape != null) | 705 | if (m_shape != null) |
706 | shape_changed = true; | 706 | shape_changed = true; |
707 | 707 | ||
708 | m_shape = value; | 708 | m_shape = value; |
@@ -740,7 +740,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
740 | } | 740 | } |
741 | 741 | ||
742 | #endregion | 742 | #endregion |
743 | 743 | ||
744 | //--------------- | 744 | //--------------- |
745 | 745 | ||
746 | 746 | ||
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
771 | get { return m_parentGroup; } | 771 | get { return m_parentGroup; } |
772 | } | 772 | } |
773 | 773 | ||
774 | 774 | ||
775 | 775 | ||
776 | public scriptEvents ScriptEvents | 776 | public scriptEvents ScriptEvents |
777 | { | 777 | { |
@@ -802,8 +802,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
802 | 802 | ||
803 | public LLQuaternion SitTargetOrientationLL | 803 | public LLQuaternion SitTargetOrientationLL |
804 | { | 804 | { |
805 | get | 805 | get |
806 | { | 806 | { |
807 | return new LLQuaternion( | 807 | return new LLQuaternion( |
808 | m_sitTargetOrientation.x, | 808 | m_sitTargetOrientation.x, |
809 | m_sitTargetOrientation.y, | 809 | m_sitTargetOrientation.y, |
@@ -830,97 +830,97 @@ namespace OpenSim.Region.Environment.Scenes | |||
830 | } | 830 | } |
831 | } | 831 | } |
832 | 832 | ||
833 | public uint ParentID | 833 | public uint ParentID |
834 | { | 834 | { |
835 | get { return _parentID; } | 835 | get { return _parentID; } |
836 | set { _parentID = value; } | 836 | set { _parentID = value; } |
837 | } | 837 | } |
838 | 838 | ||
839 | public int CreationDate | 839 | public int CreationDate |
840 | { | 840 | { |
841 | get { return _creationDate; } | 841 | get { return _creationDate; } |
842 | set { _creationDate = value; } | 842 | set { _creationDate = value; } |
843 | } | 843 | } |
844 | 844 | ||
845 | public uint Category | 845 | public uint Category |
846 | { | 846 | { |
847 | get { return _category; } | 847 | get { return _category; } |
848 | set { _category = value; } | 848 | set { _category = value; } |
849 | } | 849 | } |
850 | 850 | ||
851 | public int SalePrice | 851 | public int SalePrice |
852 | { | 852 | { |
853 | get { return _salePrice; } | 853 | get { return _salePrice; } |
854 | set { _salePrice = value; } | 854 | set { _salePrice = value; } |
855 | } | 855 | } |
856 | 856 | ||
857 | public byte ObjectSaleType | 857 | public byte ObjectSaleType |
858 | { | 858 | { |
859 | get { return _objectSaleType; } | 859 | get { return _objectSaleType; } |
860 | set { _objectSaleType = value; } | 860 | set { _objectSaleType = value; } |
861 | } | 861 | } |
862 | 862 | ||
863 | public int OwnershipCost | 863 | public int OwnershipCost |
864 | { | 864 | { |
865 | get { return _ownershipCost; } | 865 | get { return _ownershipCost; } |
866 | set { _ownershipCost = value; } | 866 | set { _ownershipCost = value; } |
867 | } | 867 | } |
868 | 868 | ||
869 | public LLUUID GroupID | 869 | public LLUUID GroupID |
870 | { | 870 | { |
871 | get { return _groupID; } | 871 | get { return _groupID; } |
872 | set { _groupID = value; } | 872 | set { _groupID = value; } |
873 | } | 873 | } |
874 | 874 | ||
875 | public LLUUID OwnerID | 875 | public LLUUID OwnerID |
876 | { | 876 | { |
877 | get { return _ownerID; } | 877 | get { return _ownerID; } |
878 | set { _ownerID = value; } | 878 | set { _ownerID = value; } |
879 | } | 879 | } |
880 | 880 | ||
881 | public LLUUID LastOwnerID | 881 | public LLUUID LastOwnerID |
882 | { | 882 | { |
883 | get { return _lastOwnerID; } | 883 | get { return _lastOwnerID; } |
884 | set { _lastOwnerID = value; } | 884 | set { _lastOwnerID = value; } |
885 | } | 885 | } |
886 | 886 | ||
887 | public uint BaseMask | 887 | public uint BaseMask |
888 | { | 888 | { |
889 | get { return _baseMask; } | 889 | get { return _baseMask; } |
890 | set { _baseMask = value; } | 890 | set { _baseMask = value; } |
891 | } | 891 | } |
892 | 892 | ||
893 | public uint OwnerMask | 893 | public uint OwnerMask |
894 | { | 894 | { |
895 | get { return _ownerMask; } | 895 | get { return _ownerMask; } |
896 | set { _ownerMask = value; } | 896 | set { _ownerMask = value; } |
897 | } | 897 | } |
898 | 898 | ||
899 | public uint GroupMask | 899 | public uint GroupMask |
900 | { | 900 | { |
901 | get { return _groupMask; } | 901 | get { return _groupMask; } |
902 | set { _groupMask = value; } | 902 | set { _groupMask = value; } |
903 | } | 903 | } |
904 | 904 | ||
905 | public uint EveryoneMask | 905 | public uint EveryoneMask |
906 | { | 906 | { |
907 | get { return _everyoneMask; } | 907 | get { return _everyoneMask; } |
908 | set { _everyoneMask = value; } | 908 | set { _everyoneMask = value; } |
909 | } | 909 | } |
910 | 910 | ||
911 | public uint NextOwnerMask | 911 | public uint NextOwnerMask |
912 | { | 912 | { |
913 | get { return _nextOwnerMask; } | 913 | get { return _nextOwnerMask; } |
914 | set { _nextOwnerMask = value; } | 914 | set { _nextOwnerMask = value; } |
915 | } | 915 | } |
916 | 916 | ||
917 | public libsecondlife.LLObject.ObjectFlags Flags | 917 | public libsecondlife.LLObject.ObjectFlags Flags |
918 | { | 918 | { |
919 | get { return _flags; } | 919 | get { return _flags; } |
920 | set { _flags = value; } | 920 | set { _flags = value; } |
921 | } | 921 | } |
922 | 922 | ||
923 | public LLUUID SitTargetAvatar | 923 | public LLUUID SitTargetAvatar |
924 | { | 924 | { |
925 | get { return m_sitTargetAvatar; } | 925 | get { return m_sitTargetAvatar; } |
926 | set { m_sitTargetAvatar = value; } | 926 | set { m_sitTargetAvatar = value; } |
@@ -929,8 +929,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
929 | [XmlIgnore] | 929 | [XmlIgnore] |
930 | public virtual LLUUID RegionID | 930 | public virtual LLUUID RegionID |
931 | { | 931 | { |
932 | get | 932 | get |
933 | { | 933 | { |
934 | if (ParentGroup != null && ParentGroup.Scene != null) | 934 | if (ParentGroup != null && ParentGroup.Scene != null) |
935 | return ParentGroup.Scene.RegionInfo.RegionID; | 935 | return ParentGroup.Scene.RegionInfo.RegionID; |
936 | else | 936 | else |
@@ -943,9 +943,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
943 | [XmlIgnore] | 943 | [XmlIgnore] |
944 | public LLUUID ParentUUID | 944 | public LLUUID ParentUUID |
945 | { | 945 | { |
946 | get | 946 | get |
947 | { | 947 | { |
948 | if (ParentGroup != null) | 948 | if (ParentGroup != null) |
949 | { | 949 | { |
950 | _parentUUID = ParentGroup.UUID; | 950 | _parentUUID = ParentGroup.UUID; |
951 | } | 951 | } |
@@ -953,7 +953,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
953 | } | 953 | } |
954 | set { _parentUUID = value; } | 954 | set { _parentUUID = value; } |
955 | } | 955 | } |
956 | 956 | ||
957 | #endregion Public Properties with only Get | 957 | #endregion Public Properties with only Get |
958 | 958 | ||
959 | #region Private Methods | 959 | #region Private Methods |
@@ -2460,7 +2460,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2460 | return; | 2460 | return; |
2461 | } | 2461 | } |
2462 | } | 2462 | } |
2463 | 2463 | ||
2464 | 2464 | ||
2465 | 2465 | ||
2466 | if (m_parentGroup.GetSceneMaxUndo() > 0) | 2466 | if (m_parentGroup.GetSceneMaxUndo() > 0) |
@@ -2914,7 +2914,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2914 | ScaleOffset = Math.Abs(ScaleOffset); | 2914 | ScaleOffset = Math.Abs(ScaleOffset); |
2915 | Vector3 offset = returnresult.normal * ScaleOffset; | 2915 | Vector3 offset = returnresult.normal * ScaleOffset; |
2916 | returnresult.ipoint = AXpos + offset; | 2916 | returnresult.ipoint = AXpos + offset; |
2917 | 2917 | ||
2918 | ///pos = (intersectionpoint + offset); | 2918 | ///pos = (intersectionpoint + offset); |
2919 | } | 2919 | } |
2920 | else | 2920 | else |
@@ -3354,27 +3354,27 @@ namespace OpenSim.Region.Environment.Scenes | |||
3354 | public void SetCameraAtOffset(LLVector3 v) { | 3354 | public void SetCameraAtOffset(LLVector3 v) { |
3355 | m_cameraAtOffset = v; | 3355 | m_cameraAtOffset = v; |
3356 | } | 3356 | } |
3357 | 3357 | ||
3358 | public void SetCameraEyeOffset(LLVector3 v) { | 3358 | public void SetCameraEyeOffset(LLVector3 v) { |
3359 | m_cameraEyeOffset = v; | 3359 | m_cameraEyeOffset = v; |
3360 | } | 3360 | } |
3361 | 3361 | ||
3362 | public void SetForceMouselook(bool force) { | 3362 | public void SetForceMouselook(bool force) { |
3363 | m_forceMouselook = force; | 3363 | m_forceMouselook = force; |
3364 | } | 3364 | } |
3365 | 3365 | ||
3366 | public LLVector3 GetCameraAtOffset() { | 3366 | public LLVector3 GetCameraAtOffset() { |
3367 | return m_cameraAtOffset; | 3367 | return m_cameraAtOffset; |
3368 | } | 3368 | } |
3369 | 3369 | ||
3370 | public LLVector3 GetCameraEyeOffset() { | 3370 | public LLVector3 GetCameraEyeOffset() { |
3371 | return m_cameraEyeOffset; | 3371 | return m_cameraEyeOffset; |
3372 | } | 3372 | } |
3373 | 3373 | ||
3374 | public bool GetForceMouselook() { | 3374 | public bool GetForceMouselook() { |
3375 | return m_forceMouselook; | 3375 | return m_forceMouselook; |
3376 | } | 3376 | } |
3377 | 3377 | ||
3378 | #endregion Public Methods | 3378 | #endregion Public Methods |
3379 | } | 3379 | } |
3380 | } | 3380 | } |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index cad2496..5669af6 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1198,7 +1198,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1198 | RemoveFromPhysicalScene(); | 1198 | RemoveFromPhysicalScene(); |
1199 | } | 1199 | } |
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | cameraAtOffset = part.GetCameraAtOffset(); | 1202 | cameraAtOffset = part.GetCameraAtOffset(); |
1203 | cameraEyeOffset = part.GetCameraEyeOffset(); | 1203 | cameraEyeOffset = part.GetCameraEyeOffset(); |
1204 | forceMouselook = part.GetForceMouselook(); | 1204 | forceMouselook = part.GetForceMouselook(); |
@@ -1347,7 +1347,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1347 | 1347 | ||
1348 | RemoveAnimation(animID); | 1348 | RemoveAnimation(animID); |
1349 | } | 1349 | } |
1350 | 1350 | ||
1351 | public LLUUID[] GetAnimationArray() | 1351 | public LLUUID[] GetAnimationArray() |
1352 | { | 1352 | { |
1353 | LLUUID[] animIDs; | 1353 | LLUUID[] animIDs; |
@@ -1696,7 +1696,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1696 | 1696 | ||
1697 | 1697 | ||
1698 | /// <summary> | 1698 | /// <summary> |
1699 | /// Do everything required once a client completes its movement into a region | 1699 | /// Do everything required once a client completes its movement into a region |
1700 | /// </summary> | 1700 | /// </summary> |
1701 | public void SendInitialData() | 1701 | public void SendInitialData() |
1702 | { | 1702 | { |
@@ -1898,7 +1898,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1898 | { | 1898 | { |
1899 | if (IsChildAgent) | 1899 | if (IsChildAgent) |
1900 | return; | 1900 | return; |
1901 | 1901 | ||
1902 | LLVector3 pos2 = AbsolutePosition; | 1902 | LLVector3 pos2 = AbsolutePosition; |
1903 | LLVector3 vel = Velocity; | 1903 | LLVector3 vel = Velocity; |
1904 | 1904 | ||
@@ -1968,9 +1968,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1968 | // This means we need to remove the current caps handler here and possibly compensate later, | 1968 | // This means we need to remove the current caps handler here and possibly compensate later, |
1969 | // in case both scenes are being hosted on the same region server. Messy | 1969 | // in case both scenes are being hosted on the same region server. Messy |
1970 | m_scene.RemoveCapsHandler(UUID); | 1970 | m_scene.RemoveCapsHandler(UUID); |
1971 | newpos = newpos + (vel); | 1971 | newpos = newpos + (vel); |
1972 | 1972 | ||
1973 | CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(UUID); | 1973 | CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(UUID); |
1974 | if (userInfo != null) | 1974 | if (userInfo != null) |
1975 | { | 1975 | { |
1976 | userInfo.DropInventory(); | 1976 | userInfo.DropInventory(); |
@@ -1978,11 +1978,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1978 | else | 1978 | else |
1979 | { | 1979 | { |
1980 | m_log.WarnFormat("[SCENE PRESENCE]: No cached user info found for {0} {1} on leaving region", Name, UUID); | 1980 | m_log.WarnFormat("[SCENE PRESENCE]: No cached user info found for {0} {1} on leaving region", Name, UUID); |
1981 | } | 1981 | } |
1982 | 1982 | ||
1983 | bool crossingSuccessful = | 1983 | bool crossingSuccessful = |
1984 | m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, | 1984 | m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, |
1985 | m_physicsActor.Flying); | 1985 | m_physicsActor.Flying); |
1986 | if (crossingSuccessful) | 1986 | if (crossingSuccessful) |
1987 | { | 1987 | { |
1988 | AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); | 1988 | AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); |
@@ -1998,8 +1998,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1998 | m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, | 1998 | m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, |
1999 | capsPath); | 1999 | capsPath); |
2000 | MakeChildAgent(); | 2000 | MakeChildAgent(); |
2001 | CrossAttachmentsIntoNewRegion(neighbourHandle); | 2001 | CrossAttachmentsIntoNewRegion(neighbourHandle); |
2002 | 2002 | ||
2003 | m_scene.SendKillObject(m_localId); | 2003 | m_scene.SendKillObject(m_localId); |
2004 | m_scene.NotifyMyCoarseLocationChange(); | 2004 | m_scene.NotifyMyCoarseLocationChange(); |
2005 | // the user may change thier profile information in other region, | 2005 | // the user may change thier profile information in other region, |
@@ -2010,7 +2010,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2010 | else | 2010 | else |
2011 | { | 2011 | { |
2012 | // Restore the user structures that we needed to delete before asking the receiving region to complete the crossing | 2012 | // Restore the user structures that we needed to delete before asking the receiving region to complete the crossing |
2013 | m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); | 2013 | m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); |
2014 | m_scene.AddCapsHandler(UUID); | 2014 | m_scene.AddCapsHandler(UUID); |
2015 | } | 2015 | } |
2016 | } | 2016 | } |
@@ -2825,7 +2825,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2825 | } | 2825 | } |
2826 | } | 2826 | } |
2827 | } | 2827 | } |
2828 | 2828 | ||
2829 | LastCommands = allflags; | 2829 | LastCommands = allflags; |
2830 | } | 2830 | } |
2831 | 2831 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index f46aba4..0e551cb 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
126 | m_report.Interval = statsUpdatesEveryMS; | 126 | m_report.Interval = statsUpdatesEveryMS; |
127 | m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat); | 127 | m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat); |
128 | m_report.Enabled = true; | 128 | m_report.Enabled = true; |
129 | 129 | ||
130 | if (StatsManager.SimExtraStats != null) | 130 | if (StatsManager.SimExtraStats != null) |
131 | OnSendStatsResult += StatsManager.SimExtraStats.ReceiveClassicSimStatsPacket; | 131 | OnSendStatsResult += StatsManager.SimExtraStats.ReceiveClassicSimStatsPacket; |
132 | } | 132 | } |
diff --git a/OpenSim/Region/Environment/Scenes/UndoState.cs b/OpenSim/Region/Environment/Scenes/UndoState.cs index 5d1f6a0..fdbfa8c 100644 --- a/OpenSim/Region/Environment/Scenes/UndoState.cs +++ b/OpenSim/Region/Environment/Scenes/UndoState.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
41 | Rotation = rot; | 41 | Rotation = rot; |
42 | Scale = scale; | 42 | Scale = scale; |
43 | } | 43 | } |
44 | 44 | ||
45 | public UndoState(SceneObjectPart part) | 45 | public UndoState(SceneObjectPart part) |
46 | { | 46 | { |
47 | if (part != null) | 47 | if (part != null) |
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
50 | { | 50 | { |
51 | Position = part.AbsolutePosition; | 51 | Position = part.AbsolutePosition; |
52 | Rotation = part.RotationOffset; | 52 | Rotation = part.RotationOffset; |
53 | 53 | ||
54 | } | 54 | } |
55 | else | 55 | else |
56 | { | 56 | { |
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
90 | if (part != null) | 90 | if (part != null) |
91 | { | 91 | { |
92 | part.Undoing = true; | 92 | part.Undoing = true; |
93 | 93 | ||
94 | if (part.ParentID == 0) | 94 | if (part.ParentID == 0) |
95 | { | 95 | { |
96 | part.ParentGroup.AbsolutePosition = Position; | 96 | part.ParentGroup.AbsolutePosition = Position; |
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
105 | part.ScheduleTerseUpdate(); | 105 | part.ScheduleTerseUpdate(); |
106 | } | 106 | } |
107 | part.Undoing = false; | 107 | part.Undoing = false; |
108 | 108 | ||
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||