aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs78
1 files changed, 39 insertions, 39 deletions
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