aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs170
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs9
2 files changed, 90 insertions, 89 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 45ce70a..8541024 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -46,20 +46,20 @@ namespace OpenSim.Region.Environment.Scenes
46 46
47 #region Events 47 #region Events
48 48
49 public event PhysicsCrash UnRecoverableError; 49 protected internal event PhysicsCrash UnRecoverableError;
50 private PhysicsCrash handlerPhysicsCrash = null; 50 private PhysicsCrash handlerPhysicsCrash = null;
51 51
52 #endregion 52 #endregion
53 53
54 #region Fields 54 #region Fields
55 55
56 internal Dictionary<LLUUID, ScenePresence> ScenePresences = new Dictionary<LLUUID, ScenePresence>(); 56 protected internal Dictionary<LLUUID, ScenePresence> ScenePresences = new Dictionary<LLUUID, ScenePresence>();
57 // SceneObjects is not currently populated or used. 57 // SceneObjects is not currently populated or used.
58 //public Dictionary<LLUUID, SceneObjectGroup> SceneObjects; 58 //public Dictionary<LLUUID, SceneObjectGroup> SceneObjects;
59 internal Dictionary<LLUUID, EntityBase> Entities = new Dictionary<LLUUID, EntityBase>(); 59 protected internal Dictionary<LLUUID, EntityBase> Entities = new Dictionary<LLUUID, EntityBase>();
60 internal Dictionary<LLUUID, ScenePresence> RestorePresences = new Dictionary<LLUUID, ScenePresence>(); 60 protected internal Dictionary<LLUUID, ScenePresence> RestorePresences = new Dictionary<LLUUID, ScenePresence>();
61 61
62 public BasicQuadTreeNode QuadTree; 62 protected internal BasicQuadTreeNode QuadTree;
63 63
64 protected RegionInfo m_regInfo; 64 protected RegionInfo m_regInfo;
65 protected Scene m_parentScene; 65 protected Scene m_parentScene;
@@ -72,13 +72,13 @@ namespace OpenSim.Region.Environment.Scenes
72 protected int m_activeScripts = 0; 72 protected int m_activeScripts = 0;
73 protected int m_scriptLPS = 0; 73 protected int m_scriptLPS = 0;
74 74
75 internal object m_syncRoot = new object(); 75 protected internal object m_syncRoot = new object();
76 76
77 public PhysicsScene _PhyScene; 77 protected internal PhysicsScene _PhyScene;
78 78
79 #endregion 79 #endregion
80 80
81 public InnerScene(Scene parent, RegionInfo regInfo) 81 protected internal InnerScene(Scene parent, RegionInfo regInfo)
82 { 82 {
83 m_parentScene = parent; 83 m_parentScene = parent;
84 m_regInfo = regInfo; 84 m_regInfo = regInfo;
@@ -114,7 +114,7 @@ namespace OpenSim.Region.Environment.Scenes
114 } 114 }
115 } 115 }
116 116
117 public void Close() 117 protected internal void Close()
118 { 118 {
119 lock (ScenePresences) 119 lock (ScenePresences)
120 { 120 {
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Scenes
127 127
128 #region Update Methods 128 #region Update Methods
129 129
130 internal void UpdatePreparePhysics() 130 protected internal void UpdatePreparePhysics()
131 { 131 {
132 // If we are using a threaded physics engine 132 // If we are using a threaded physics engine
133 // grab the latest scene from the engine before 133 // grab the latest scene from the engine before
@@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Scenes
141 } 141 }
142 } 142 }
143 143
144 internal void UpdateEntities() 144 protected internal void UpdateEntities()
145 { 145 {
146 List<EntityBase> updateEntities = GetEntities(); 146 List<EntityBase> updateEntities = GetEntities();
147 147
@@ -151,7 +151,7 @@ namespace OpenSim.Region.Environment.Scenes
151 } 151 }
152 } 152 }
153 153
154 internal void UpdatePresences() 154 protected internal void UpdatePresences()
155 { 155 {
156 List<ScenePresence> updateScenePresences = GetScenePresences(); 156 List<ScenePresence> updateScenePresences = GetScenePresences();
157 foreach (ScenePresence pres in updateScenePresences) 157 foreach (ScenePresence pres in updateScenePresences)
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Scenes
160 } 160 }
161 } 161 }
162 162
163 internal float UpdatePhysics(double elapsed) 163 protected internal float UpdatePhysics(double elapsed)
164 { 164 {
165 lock (m_syncRoot) 165 lock (m_syncRoot)
166 { 166 {
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Scenes
168 } 168 }
169 } 169 }
170 170
171 internal void UpdateEntityMovement() 171 protected internal void UpdateEntityMovement()
172 { 172 {
173 List<EntityBase> moveEntities = GetEntities(); 173 List<EntityBase> moveEntities = GetEntities();
174 174
@@ -186,7 +186,7 @@ namespace OpenSim.Region.Environment.Scenes
186 /// Add an object into the scene that has come from storage 186 /// Add an object into the scene that has come from storage
187 /// </summary> 187 /// </summary>
188 /// <param name="sceneObject"></param> 188 /// <param name="sceneObject"></param>
189 public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject) 189 protected internal void AddSceneObjectFromStorage(SceneObjectGroup sceneObject)
190 { 190 {
191 sceneObject.RegionHandle = m_regInfo.RegionHandle; 191 sceneObject.RegionHandle = m_regInfo.RegionHandle;
192 sceneObject.SetScene(m_parentScene); 192 sceneObject.SetScene(m_parentScene);
@@ -206,7 +206,7 @@ namespace OpenSim.Region.Environment.Scenes
206 /// <param name="sceneObject"></param> 206 /// <param name="sceneObject"></param>
207 /// <returns>true if the object was added, false if an object with the same uuid was already in the scene 207 /// <returns>true if the object was added, false if an object with the same uuid was already in the scene
208 /// </returns> 208 /// </returns>
209 public bool AddSceneObject(SceneObjectGroup sceneObject) 209 protected internal bool AddSceneObject(SceneObjectGroup sceneObject)
210 { 210 {
211 lock (Entities) 211 lock (Entities)
212 { 212 {
@@ -228,7 +228,7 @@ namespace OpenSim.Region.Environment.Scenes
228 /// </summary> 228 /// </summary>
229 /// <param name="sceneObject"></param> 229 /// <param name="sceneObject"></param>
230 /// <returns>true if the object was deleted, false if there was no object to delete</returns> 230 /// <returns>true if the object was deleted, false if there was no object to delete</returns>
231 public bool DeleteSceneObject(LLUUID uuid) 231 protected internal bool DeleteSceneObject(LLUUID uuid)
232 { 232 {
233 lock (Entities) 233 lock (Entities)
234 { 234 {
@@ -250,7 +250,7 @@ namespace OpenSim.Region.Environment.Scenes
250 /// <param name="obj"> 250 /// <param name="obj">
251 /// A <see cref="EntityBase"/> 251 /// A <see cref="EntityBase"/>
252 /// </param> 252 /// </param>
253 internal void AddToUpdateList(EntityBase obj) 253 protected internal void AddToUpdateList(EntityBase obj)
254 { 254 {
255 lock (m_updateList) 255 lock (m_updateList)
256 { 256 {
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Environment.Scenes
264 /// <summary> 264 /// <summary>
265 /// Process all pending updates 265 /// Process all pending updates
266 /// </summary> 266 /// </summary>
267 internal void ProcessUpdates() 267 protected internal void ProcessUpdates()
268 { 268 {
269 lock (m_updateList) 269 lock (m_updateList)
270 { 270 {
@@ -294,27 +294,27 @@ namespace OpenSim.Region.Environment.Scenes
294 } 294 }
295 } 295 }
296 296
297 public void AddPhysicalPrim(int number) 297 protected internal void AddPhysicalPrim(int number)
298 { 298 {
299 m_physicalPrim++; 299 m_physicalPrim++;
300 } 300 }
301 301
302 public void RemovePhysicalPrim(int number) 302 protected internal void RemovePhysicalPrim(int number)
303 { 303 {
304 m_physicalPrim--; 304 m_physicalPrim--;
305 } 305 }
306 306
307 public void AddToScriptLPS(int number) 307 protected internal void AddToScriptLPS(int number)
308 { 308 {
309 m_scriptLPS += number; 309 m_scriptLPS += number;
310 } 310 }
311 311
312 public void AddActiveScripts(int number) 312 protected internal void AddActiveScripts(int number)
313 { 313 {
314 m_activeScripts += number; 314 m_activeScripts += number;
315 } 315 }
316 316
317 public void DetachObject(uint objectLocalID, IClientAPI remoteClient) 317 protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient)
318 { 318 {
319 List<EntityBase> EntityList = GetEntities(); 319 List<EntityBase> EntityList = GetEntities();
320 320
@@ -331,23 +331,20 @@ namespace OpenSim.Region.Environment.Scenes
331 } 331 }
332 } 332 }
333 } 333 }
334
335 } 334 }
336 335
337 public void HandleUndo(IClientAPI remoteClient, LLUUID primId) 336 protected internal void HandleUndo(IClientAPI remoteClient, LLUUID primId)
338 { 337 {
339 if (primId != LLUUID.Zero) 338 if (primId != LLUUID.Zero)
340 { 339 {
341 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId); 340 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId);
342 if (part != null) 341 if (part != null)
343 part.Undo(); 342 part.Undo();
344 343 }
345 }
346
347
348 } 344 }
349 public void HandleObjectGroupUpdate( 345
350 IClientAPI remoteClient, LLUUID GroupID, uint objectLocalID, LLUUID Garbage) 346 protected internal void HandleObjectGroupUpdate(
347 IClientAPI remoteClient, LLUUID GroupID, uint objectLocalID, LLUUID Garbage)
351 { 348 {
352 List<EntityBase> EntityList = GetEntities(); 349 List<EntityBase> EntityList = GetEntities();
353 350
@@ -367,9 +364,8 @@ namespace OpenSim.Region.Environment.Scenes
367 } 364 }
368 } 365 }
369 } 366 }
370
371
372 } 367 }
368
373 /// <summary> 369 /// <summary>
374 /// Event Handling routine for Attach Object 370 /// Event Handling routine for Attach Object
375 /// </summary> 371 /// </summary>
@@ -377,13 +373,15 @@ namespace OpenSim.Region.Environment.Scenes
377 /// <param name="objectLocalID"></param> 373 /// <param name="objectLocalID"></param>
378 /// <param name="AttachmentPt"></param> 374 /// <param name="AttachmentPt"></param>
379 /// <param name="rot"></param> 375 /// <param name="rot"></param>
380 public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot) 376 protected internal void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot)
381 { 377 {
382 // Calls attach with a Zero position 378 // Calls attach with a Zero position
383 379
384 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); 380 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero);
385 } 381 }
386 public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) 382
383 protected internal void RezSingleAttachment(
384 IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask)
387 { 385 {
388 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, itemID, LLVector3.Zero, LLVector3.Zero, LLUUID.Zero, (byte)1, true, 386 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, itemID, LLVector3.Zero, LLVector3.Zero, LLUUID.Zero, (byte)1, true,
389 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer), 387 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer),
@@ -396,12 +394,11 @@ namespace OpenSim.Region.Environment.Scenes
396 AttachObject(remoteClient,objatt.LocalId,AttachmentPt,new LLQuaternion(0,0,0,1),objatt.AbsolutePosition); 394 AttachObject(remoteClient,objatt.LocalId,AttachmentPt,new LLQuaternion(0,0,0,1),objatt.AbsolutePosition);
397 objatt.ScheduleGroupForFullUpdate(); 395 objatt.ScheduleGroupForFullUpdate();
398 } 396 }
399
400 } 397 }
401 398
402 // What makes this method odd and unique is it tries to detach using an LLUUID.... Yay for standards. 399 // What makes this method odd and unique is it tries to detach using an LLUUID.... Yay for standards.
403 // To LocalId or LLUUID, *THAT* is the question. How now Brown LLUUID?? 400 // To LocalId or LLUUID, *THAT* is the question. How now Brown LLUUID??
404 public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient) 401 protected internal void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient)
405 { 402 {
406 if (itemID == LLUUID.Zero) // If this happened, someone made a mistake.... 403 if (itemID == LLUUID.Zero) // If this happened, someone made a mistake....
407 return; 404 return;
@@ -424,7 +421,8 @@ namespace OpenSim.Region.Environment.Scenes
424 } 421 }
425 } 422 }
426 423
427 public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot, LLVector3 attachPos) 424 protected internal void AttachObject(
425 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot, LLVector3 attachPos)
428 { 426 {
429 List<EntityBase> EntityList = GetEntities(); 427 List<EntityBase> EntityList = GetEntities();
430 foreach (EntityBase obj in EntityList) 428 foreach (EntityBase obj in EntityList)
@@ -482,10 +480,8 @@ namespace OpenSim.Region.Environment.Scenes
482 } 480 }
483 481
484 } 482 }
485
486 } 483 }
487 } 484 }
488
489 } 485 }
490 486
491 protected internal ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child, AvatarAppearance appearance) 487 protected internal ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child, AvatarAppearance appearance)
@@ -563,7 +559,7 @@ namespace OpenSim.Region.Environment.Scenes
563 } 559 }
564 } 560 }
565 561
566 public void SwapRootChildAgent(bool direction_RC_CR_T_F) 562 protected internal void SwapRootChildAgent(bool direction_RC_CR_T_F)
567 { 563 {
568 if (direction_RC_CR_T_F) 564 if (direction_RC_CR_T_F)
569 { 565 {
@@ -577,7 +573,7 @@ namespace OpenSim.Region.Environment.Scenes
577 } 573 }
578 } 574 }
579 575
580 public void removeUserCount(bool TypeRCTF) 576 protected internal void removeUserCount(bool TypeRCTF)
581 { 577 {
582 if (TypeRCTF) 578 if (TypeRCTF)
583 { 579 {
@@ -589,7 +585,7 @@ namespace OpenSim.Region.Environment.Scenes
589 } 585 }
590 } 586 }
591 587
592 public int GetChildAgentCount() 588 protected internal int GetChildAgentCount()
593 { 589 {
594 // some network situations come in where child agents get closed twice. 590 // some network situations come in where child agents get closed twice.
595 if (m_numChildAgents < 0) 591 if (m_numChildAgents < 0)
@@ -600,32 +596,33 @@ namespace OpenSim.Region.Environment.Scenes
600 return m_numChildAgents; 596 return m_numChildAgents;
601 } 597 }
602 598
603 public int GetRootAgentCount() 599 protected internal int GetRootAgentCount()
604 { 600 {
605 return m_numRootAgents; 601 return m_numRootAgents;
606 } 602 }
607 603
608 public int GetTotalObjects() 604 protected internal int GetTotalObjects()
609 { 605 {
610 return m_numPrim; 606 return m_numPrim;
611 } 607 }
612 608
613 public int GetActiveObjects() 609 protected internal int GetActiveObjects()
614 { 610 {
615 return m_physicalPrim; 611 return m_physicalPrim;
616 } 612 }
617 613
618 public int GetActiveScripts() 614 protected internal int GetActiveScripts()
619 { 615 {
620 return m_activeScripts; 616 return m_activeScripts;
621 } 617 }
622 618
623 public int GetScriptLPS() 619 protected internal int GetScriptLPS()
624 { 620 {
625 int returnval = m_scriptLPS; 621 int returnval = m_scriptLPS;
626 m_scriptLPS = 0; 622 m_scriptLPS = 0;
627 return returnval; 623 return returnval;
628 } 624 }
625
629 #endregion 626 #endregion
630 627
631 #region Get Methods 628 #region Get Methods
@@ -634,7 +631,7 @@ namespace OpenSim.Region.Environment.Scenes
634 /// Request a List of all m_scenePresences in this World 631 /// Request a List of all m_scenePresences in this World
635 /// </summary> 632 /// </summary>
636 /// <returns></returns> 633 /// <returns></returns>
637 public List<ScenePresence> GetScenePresences() 634 protected internal List<ScenePresence> GetScenePresences()
638 { 635 {
639 List<ScenePresence> result; 636 List<ScenePresence> result;
640 637
@@ -646,7 +643,7 @@ namespace OpenSim.Region.Environment.Scenes
646 return result; 643 return result;
647 } 644 }
648 645
649 public List<ScenePresence> GetAvatars() 646 protected internal List<ScenePresence> GetAvatars()
650 { 647 {
651 List<ScenePresence> result = 648 List<ScenePresence> result =
652 GetScenePresences(delegate(ScenePresence scenePresence) { return !scenePresence.IsChildAgent; }); 649 GetScenePresences(delegate(ScenePresence scenePresence) { return !scenePresence.IsChildAgent; });
@@ -664,7 +661,7 @@ namespace OpenSim.Region.Environment.Scenes
664 /// </summary> 661 /// </summary>
665 /// <param name="agentId"></param> 662 /// <param name="agentId"></param>
666 /// <returns>null if either the avatar wasn't in the scene, or they do not have a controlling client</returns> 663 /// <returns>null if either the avatar wasn't in the scene, or they do not have a controlling client</returns>
667 public IClientAPI GetControllingClient(LLUUID agentId) 664 protected internal IClientAPI GetControllingClient(LLUUID agentId)
668 { 665 {
669 ScenePresence presence = GetScenePresence(agentId); 666 ScenePresence presence = GetScenePresence(agentId);
670 667
@@ -680,7 +677,7 @@ namespace OpenSim.Region.Environment.Scenes
680 /// Request a filtered list of m_scenePresences in this World 677 /// Request a filtered list of m_scenePresences in this World
681 /// </summary> 678 /// </summary>
682 /// <returns></returns> 679 /// <returns></returns>
683 public List<ScenePresence> GetScenePresences(FilterAvatarList filter) 680 protected internal List<ScenePresence> GetScenePresences(FilterAvatarList filter)
684 { 681 {
685 // No locking of scene presences here since we're passing back a list... 682 // No locking of scene presences here since we're passing back a list...
686 683
@@ -703,7 +700,7 @@ namespace OpenSim.Region.Environment.Scenes
703 /// </summary> 700 /// </summary>
704 /// <param name="avatarID"></param> 701 /// <param name="avatarID"></param>
705 /// <returns>null if the agent was not found</returns> 702 /// <returns>null if the agent was not found</returns>
706 public ScenePresence GetScenePresence(LLUUID agentID) 703 protected internal ScenePresence GetScenePresence(LLUUID agentID)
707 { 704 {
708 ScenePresence sp; 705 ScenePresence sp;
709 ScenePresences.TryGetValue(agentID, out sp); 706 ScenePresences.TryGetValue(agentID, out sp);
@@ -741,7 +738,7 @@ namespace OpenSim.Region.Environment.Scenes
741 return null; 738 return null;
742 } 739 }
743 740
744 public EntityIntersection GetClosestIntersectingPrim(Ray hray, bool frontFacesOnly, bool faceCenters) 741 protected internal EntityIntersection GetClosestIntersectingPrim(Ray hray, bool frontFacesOnly, bool faceCenters)
745 { 742 {
746 // Primitive Ray Tracing 743 // Primitive Ray Tracing
747 float closestDistance = 280f; 744 float closestDistance = 280f;
@@ -765,7 +762,7 @@ namespace OpenSim.Region.Environment.Scenes
765 return returnResult; 762 return returnResult;
766 } 763 }
767 764
768 public SceneObjectPart GetSceneObjectPart(uint localID) 765 protected internal SceneObjectPart GetSceneObjectPart(uint localID)
769 { 766 {
770 SceneObjectGroup group = GetGroupByPrim(localID); 767 SceneObjectGroup group = GetGroupByPrim(localID);
771 if (group != null) 768 if (group != null)
@@ -774,7 +771,7 @@ namespace OpenSim.Region.Environment.Scenes
774 return null; 771 return null;
775 } 772 }
776 773
777 public SceneObjectPart GetSceneObjectPart(LLUUID fullID) 774 protected internal SceneObjectPart GetSceneObjectPart(LLUUID fullID)
778 { 775 {
779 SceneObjectGroup group = GetGroupByPrim(fullID); 776 SceneObjectGroup group = GetGroupByPrim(fullID);
780 if (group != null) 777 if (group != null)
@@ -783,7 +780,7 @@ namespace OpenSim.Region.Environment.Scenes
783 return null; 780 return null;
784 } 781 }
785 782
786 internal bool TryGetAvatar(LLUUID avatarId, out ScenePresence avatar) 783 protected internal bool TryGetAvatar(LLUUID avatarId, out ScenePresence avatar)
787 { 784 {
788 ScenePresence presence; 785 ScenePresence presence;
789 if (ScenePresences.TryGetValue(avatarId, out presence)) 786 if (ScenePresences.TryGetValue(avatarId, out presence))
@@ -805,7 +802,7 @@ namespace OpenSim.Region.Environment.Scenes
805 return false; 802 return false;
806 } 803 }
807 804
808 internal bool TryGetAvatarByName(string avatarName, out ScenePresence avatar) 805 protected internal bool TryGetAvatarByName(string avatarName, out ScenePresence avatar)
809 { 806 {
810 lock (ScenePresences) 807 lock (ScenePresences)
811 { 808 {
@@ -833,7 +830,7 @@ namespace OpenSim.Region.Environment.Scenes
833 /// will not affect the original list of objects in the scene. 830 /// will not affect the original list of objects in the scene.
834 /// </summary> 831 /// </summary>
835 /// <returns></returns> 832 /// <returns></returns>
836 public List<EntityBase> GetEntities() 833 protected internal List<EntityBase> GetEntities()
837 { 834 {
838 List<EntityBase> result; 835 List<EntityBase> result;
839 836
@@ -845,7 +842,7 @@ namespace OpenSim.Region.Environment.Scenes
845 return result; 842 return result;
846 } 843 }
847 844
848 public Dictionary<uint, float> GetTopScripts() 845 protected internal Dictionary<uint, float> GetTopScripts()
849 { 846 {
850 Dictionary<uint, float> topScripts = new Dictionary<uint, float>(); 847 Dictionary<uint, float> topScripts = new Dictionary<uint, float>();
851 848
@@ -880,7 +877,7 @@ namespace OpenSim.Region.Environment.Scenes
880 877
881 #region Other Methods 878 #region Other Methods
882 879
883 public void physicsBasedCrash() 880 protected internal void physicsBasedCrash()
884 { 881 {
885 handlerPhysicsCrash = UnRecoverableError; 882 handlerPhysicsCrash = UnRecoverableError;
886 if (handlerPhysicsCrash != null) 883 if (handlerPhysicsCrash != null)
@@ -889,7 +886,7 @@ namespace OpenSim.Region.Environment.Scenes
889 } 886 }
890 } 887 }
891 888
892 public LLUUID ConvertLocalIDToFullID(uint localID) 889 protected internal LLUUID ConvertLocalIDToFullID(uint localID)
893 { 890 {
894 SceneObjectGroup group = GetGroupByPrim(localID); 891 SceneObjectGroup group = GetGroupByPrim(localID);
895 if (group != null) 892 if (group != null)
@@ -898,7 +895,7 @@ namespace OpenSim.Region.Environment.Scenes
898 return LLUUID.Zero; 895 return LLUUID.Zero;
899 } 896 }
900 897
901 public void SendAllSceneObjectsToClient(ScenePresence presence) 898 protected internal void SendAllSceneObjectsToClient(ScenePresence presence)
902 { 899 {
903 List<EntityBase> EntityList = GetEntities(); 900 List<EntityBase> EntityList = GetEntities();
904 901
@@ -935,7 +932,7 @@ namespace OpenSim.Region.Environment.Scenes
935 } 932 }
936 } 933 }
937 934
938 internal void ForEachClient(Action<IClientAPI> action) 935 protected internal void ForEachClient(Action<IClientAPI> action)
939 { 936 {
940 lock (ScenePresences) 937 lock (ScenePresences)
941 { 938 {
@@ -956,7 +953,7 @@ namespace OpenSim.Region.Environment.Scenes
956 /// <param name="localID"></param> 953 /// <param name="localID"></param>
957 /// <param name="scale"></param> 954 /// <param name="scale"></param>
958 /// <param name="remoteClient"></param> 955 /// <param name="remoteClient"></param>
959 public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 956 protected internal void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
960 { 957 {
961 SceneObjectGroup group = GetGroupByPrim(localID); 958 SceneObjectGroup group = GetGroupByPrim(localID);
962 if (group != null) 959 if (group != null)
@@ -967,7 +964,8 @@ namespace OpenSim.Region.Environment.Scenes
967 } 964 }
968 } 965 }
969 } 966 }
970 public void UpdatePrimGroupScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 967
968 protected internal void UpdatePrimGroupScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
971 { 969 {
972 SceneObjectGroup group = GetGroupByPrim(localID); 970 SceneObjectGroup group = GetGroupByPrim(localID);
973 if (group != null) 971 if (group != null)
@@ -987,8 +985,8 @@ namespace OpenSim.Region.Environment.Scenes
987 /// <param name="AgentID"></param> 985 /// <param name="AgentID"></param>
988 /// <param name="RequestFlags"></param> 986 /// <param name="RequestFlags"></param>
989 /// <param name="ObjectID"></param> 987 /// <param name="ObjectID"></param>
990 public void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, 988 protected internal void RequestObjectPropertiesFamily(
991 LLUUID ObjectID) 989 IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID ObjectID)
992 { 990 {
993 SceneObjectGroup group = GetGroupByPrim(ObjectID); 991 SceneObjectGroup group = GetGroupByPrim(ObjectID);
994 if (group != null) 992 if (group != null)
@@ -1003,7 +1001,7 @@ namespace OpenSim.Region.Environment.Scenes
1003 /// <param name="localID"></param> 1001 /// <param name="localID"></param>
1004 /// <param name="rot"></param> 1002 /// <param name="rot"></param>
1005 /// <param name="remoteClient"></param> 1003 /// <param name="remoteClient"></param>
1006 public void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 1004 protected internal void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
1007 { 1005 {
1008 SceneObjectGroup group = GetGroupByPrim(localID); 1006 SceneObjectGroup group = GetGroupByPrim(localID);
1009 if (group != null) 1007 if (group != null)
@@ -1021,7 +1019,7 @@ namespace OpenSim.Region.Environment.Scenes
1021 /// <param name="localID"></param> 1019 /// <param name="localID"></param>
1022 /// <param name="rot"></param> 1020 /// <param name="rot"></param>
1023 /// <param name="remoteClient"></param> 1021 /// <param name="remoteClient"></param>
1024 public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 1022 protected internal void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
1025 { 1023 {
1026 SceneObjectGroup group = GetGroupByPrim(localID); 1024 SceneObjectGroup group = GetGroupByPrim(localID);
1027 if (group != null) 1025 if (group != null)
@@ -1040,7 +1038,7 @@ namespace OpenSim.Region.Environment.Scenes
1040 /// <param name="pos"></param> 1038 /// <param name="pos"></param>
1041 /// <param name="rot"></param> 1039 /// <param name="rot"></param>
1042 /// <param name="remoteClient"></param> 1040 /// <param name="remoteClient"></param>
1043 public void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient) 1041 protected internal void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient)
1044 { 1042 {
1045 SceneObjectGroup group = GetGroupByPrim(localID); 1043 SceneObjectGroup group = GetGroupByPrim(localID);
1046 if (group != null) 1044 if (group != null)
@@ -1052,7 +1050,7 @@ namespace OpenSim.Region.Environment.Scenes
1052 } 1050 }
1053 } 1051 }
1054 1052
1055 public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 1053 protected internal void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
1056 { 1054 {
1057 SceneObjectGroup group = GetGroupByPrim(localID); 1055 SceneObjectGroup group = GetGroupByPrim(localID);
1058 if (group != null) 1056 if (group != null)
@@ -1076,7 +1074,7 @@ namespace OpenSim.Region.Environment.Scenes
1076 /// <param name="localID"></param> 1074 /// <param name="localID"></param>
1077 /// <param name="pos"></param> 1075 /// <param name="pos"></param>
1078 /// <param name="remoteClient"></param> 1076 /// <param name="remoteClient"></param>
1079 public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 1077 protected internal void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
1080 { 1078 {
1081 SceneObjectGroup group = GetGroupByPrim(localID); 1079 SceneObjectGroup group = GetGroupByPrim(localID);
1082 if (group != null) 1080 if (group != null)
@@ -1108,7 +1106,7 @@ namespace OpenSim.Region.Environment.Scenes
1108 /// <param name="localID"></param> 1106 /// <param name="localID"></param>
1109 /// <param name="texture"></param> 1107 /// <param name="texture"></param>
1110 /// <param name="remoteClient"></param> 1108 /// <param name="remoteClient"></param>
1111 public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) 1109 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
1112 { 1110 {
1113 SceneObjectGroup group = GetGroupByPrim(localID); 1111 SceneObjectGroup group = GetGroupByPrim(localID);
1114 if (group != null) 1112 if (group != null)
@@ -1126,7 +1124,7 @@ namespace OpenSim.Region.Environment.Scenes
1126 /// <param name="localID"></param> 1124 /// <param name="localID"></param>
1127 /// <param name="packet"></param> 1125 /// <param name="packet"></param>
1128 /// <param name="remoteClient"></param> 1126 /// <param name="remoteClient"></param>
1129 public void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient) 1127 protected internal void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient)
1130 { 1128 {
1131 SceneObjectGroup group = GetGroupByPrim(localID); 1129 SceneObjectGroup group = GetGroupByPrim(localID);
1132 if (group != null) 1130 if (group != null)
@@ -1138,7 +1136,7 @@ namespace OpenSim.Region.Environment.Scenes
1138 } 1136 }
1139 } 1137 }
1140 1138
1141 public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) 1139 protected internal void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
1142 { 1140 {
1143 SceneObjectGroup group = GetGroupByPrim(objectID); 1141 SceneObjectGroup group = GetGroupByPrim(objectID);
1144 if (group != null) 1142 if (group != null)
@@ -1160,7 +1158,7 @@ namespace OpenSim.Region.Environment.Scenes
1160 /// </summary> 1158 /// </summary>
1161 /// <param name="primLocalID"></param> 1159 /// <param name="primLocalID"></param>
1162 /// <param name="description"></param> 1160 /// <param name="description"></param>
1163 public void PrimName(IClientAPI remoteClient, uint primLocalID, string name) 1161 protected internal void PrimName(IClientAPI remoteClient, uint primLocalID, string name)
1164 { 1162 {
1165 SceneObjectGroup group = GetGroupByPrim(primLocalID); 1163 SceneObjectGroup group = GetGroupByPrim(primLocalID);
1166 if (group != null) 1164 if (group != null)
@@ -1177,7 +1175,7 @@ namespace OpenSim.Region.Environment.Scenes
1177 /// </summary> 1175 /// </summary>
1178 /// <param name="primLocalID"></param> 1176 /// <param name="primLocalID"></param>
1179 /// <param name="description"></param> 1177 /// <param name="description"></param>
1180 public void PrimDescription(IClientAPI remoteClient, uint primLocalID, string description) 1178 protected internal void PrimDescription(IClientAPI remoteClient, uint primLocalID, string description)
1181 { 1179 {
1182 SceneObjectGroup group = GetGroupByPrim(primLocalID); 1180 SceneObjectGroup group = GetGroupByPrim(primLocalID);
1183 if (group != null) 1181 if (group != null)
@@ -1189,7 +1187,7 @@ namespace OpenSim.Region.Environment.Scenes
1189 } 1187 }
1190 } 1188 }
1191 1189
1192 public void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data) 1190 protected internal void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data)
1193 { 1191 {
1194 SceneObjectGroup group = GetGroupByPrim(primLocalID); 1192 SceneObjectGroup group = GetGroupByPrim(primLocalID);
1195 1193
@@ -1207,7 +1205,7 @@ namespace OpenSim.Region.Environment.Scenes
1207 /// </summary> 1205 /// </summary>
1208 /// <param name="primLocalID"></param> 1206 /// <param name="primLocalID"></param>
1209 /// <param name="shapeBlock"></param> 1207 /// <param name="shapeBlock"></param>
1210 public void UpdatePrimShape(LLUUID agentID, uint primLocalID, UpdateShapeArgs shapeBlock) 1208 protected internal void UpdatePrimShape(LLUUID agentID, uint primLocalID, UpdateShapeArgs shapeBlock)
1211 { 1209 {
1212 SceneObjectGroup group = GetGroupByPrim(primLocalID); 1210 SceneObjectGroup group = GetGroupByPrim(primLocalID);
1213 if (group != null) 1211 if (group != null)
@@ -1246,7 +1244,7 @@ namespace OpenSim.Region.Environment.Scenes
1246 /// <param name="client"></param> 1244 /// <param name="client"></param>
1247 /// <param name="parentPrim"></param> 1245 /// <param name="parentPrim"></param>
1248 /// <param name="childPrims"></param> 1246 /// <param name="childPrims"></param>
1249 public void LinkObjects(IClientAPI client, uint parentPrim, List<uint> childPrims) 1247 protected internal void LinkObjects(IClientAPI client, uint parentPrim, List<uint> childPrims)
1250 { 1248 {
1251 List<EntityBase> EntityList = GetEntities(); 1249 List<EntityBase> EntityList = GetEntities();
1252 1250
@@ -1295,7 +1293,7 @@ namespace OpenSim.Region.Environment.Scenes
1295 /// Delink a linkset 1293 /// Delink a linkset
1296 /// </summary> 1294 /// </summary>
1297 /// <param name="prims"></param> 1295 /// <param name="prims"></param>
1298 public void DelinkObjects(List<uint> primIds) 1296 protected internal void DelinkObjects(List<uint> primIds)
1299 { 1297 {
1300 SceneObjectGroup parenPrim = null; 1298 SceneObjectGroup parenPrim = null;
1301 1299
@@ -1365,7 +1363,7 @@ namespace OpenSim.Region.Environment.Scenes
1365 } 1363 }
1366 } 1364 }
1367 1365
1368 public void MakeObjectSearchable(IClientAPI remoteClient, bool IncludeInSearch, uint localID) 1366 protected internal void MakeObjectSearchable(IClientAPI remoteClient, bool IncludeInSearch, uint localID)
1369 { 1367 {
1370 LLUUID user = remoteClient.AgentId; 1368 LLUUID user = remoteClient.AgentId;
1371 LLUUID objid = null; 1369 LLUUID objid = null;
@@ -1415,7 +1413,7 @@ namespace OpenSim.Region.Environment.Scenes
1415 /// <param name="originalPrim"></param> 1413 /// <param name="originalPrim"></param>
1416 /// <param name="offset"></param> 1414 /// <param name="offset"></param>
1417 /// <param name="flags"></param> 1415 /// <param name="flags"></param>
1418 public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID) 1416 protected internal void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID)
1419 { 1417 {
1420 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); 1418 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
1421 1419
@@ -1472,7 +1470,7 @@ namespace OpenSim.Region.Environment.Scenes
1472 /// <param name="v1"></param> 1470 /// <param name="v1"></param>
1473 /// <param name="v2"></param> 1471 /// <param name="v2"></param>
1474 /// <returns></returns> 1472 /// <returns></returns>
1475 public float Vector3Distance(Vector3 v1, Vector3 v2) 1473 protected internal float Vector3Distance(Vector3 v1, Vector3 v2)
1476 { 1474 {
1477 // We don't really need the double floating point precision... 1475 // We don't really need the double floating point precision...
1478 // so casting it to a single 1476 // so casting it to a single
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1beea2b..1bcd3fd 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -3065,7 +3065,8 @@ namespace OpenSim.Region.Environment.Scenes
3065 // ie it could be all m_scenePresences within a certain range of the calling prim/avatar. 3065 // ie it could be all m_scenePresences within a certain range of the calling prim/avatar.
3066 3066
3067 /// <summary> 3067 /// <summary>
3068 /// 3068 /// Return a list of all avatars in this region.
3069 /// This list is a new object, so it can be iterated over without locking.
3069 /// </summary> 3070 /// </summary>
3070 /// <returns></returns> 3071 /// <returns></returns>
3071 public List<ScenePresence> GetAvatars() 3072 public List<ScenePresence> GetAvatars()
@@ -3074,7 +3075,8 @@ namespace OpenSim.Region.Environment.Scenes
3074 } 3075 }
3075 3076
3076 /// <summary> 3077 /// <summary>
3077 /// Request a List of all ScenePresences in this region. This returns child agents as well as root agents. 3078 /// Return a list of all ScenePresences in this region. This returns child agents as well as root agents.
3079 /// This list is a new object, so it can be iterated over without locking.
3078 /// </summary> 3080 /// </summary>
3079 /// <returns></returns> 3081 /// <returns></returns>
3080 public List<ScenePresence> GetScenePresences() 3082 public List<ScenePresence> GetScenePresences()
@@ -3083,7 +3085,8 @@ namespace OpenSim.Region.Environment.Scenes
3083 } 3085 }
3084 3086
3085 /// <summary> 3087 /// <summary>
3086 /// Request a filtered list of ScenePresences in this region 3088 /// Request a filtered list of ScenePresences in this region.
3089 /// This list is a new object, so it can be iterated over without locking.
3087 /// </summary> 3090 /// </summary>
3088 /// <param name="filter"></param> 3091 /// <param name="filter"></param>
3089 /// <returns></returns> 3092 /// <returns></returns>