aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-24 22:45:13 +0000
committerJustin Clarke Casey2008-05-24 22:45:13 +0000
commitf3067ce6f9f2ea992f0e601ab120f3a1ff89cf94 (patch)
tree0ec2ccf815cba335f42b9a64f6a9cc18b0c78230
parent* Refactor: Renaming various *Entity*() methods to *Object*() methods on the ... (diff)
downloadopensim-SC-f3067ce6f9f2ea992f0e601ab120f3a1ff89cf94.zip
opensim-SC-f3067ce6f9f2ea992f0e601ab120f3a1ff89cf94.tar.gz
opensim-SC-f3067ce6f9f2ea992f0e601ab120f3a1ff89cf94.tar.bz2
opensim-SC-f3067ce6f9f2ea992f0e601ab120f3a1ff89cf94.tar.xz
* Refactor: Change previous commits Object methods to SceneObject methods instead, on the basis that this is less likely to cause confusion with c#'s base object type
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs4
-rw-r--r--OpenSim/Region/Examples/SimpleModule/ComplexObject.cs2
-rw-r--r--OpenSim/Region/Examples/SimpleModule/RegionModule.cs6
9 files changed, 30 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
index ce78f21..27f16a7 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
@@ -73,6 +73,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
73 m_log.Warn("[ARCHIVER]: Archive region not yet implemented"); 73 m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
74 74
75 List<EntityBase> entities = m_scene.GetEntities(); 75 List<EntityBase> entities = m_scene.GetEntities();
76
77 foreach (EntityBase entity in entities)
78 {
79
80 }
81
76 string serEntities = SerializeObjects(entities); 82 string serEntities = SerializeObjects(entities);
77 83
78 if (serEntities != null && serEntities.Length > 0) 84 if (serEntities != null && serEntities.Length > 0)
diff --git a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
index ae70436..c56ed08 100644
--- a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
@@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
179 179
180 if (Util.RandomClass.NextDouble() < killLikelyhood) 180 if (Util.RandomClass.NextDouble() < killLikelyhood)
181 { 181 {
182 m_scene.RemoveObject(selectedTree.ParentGroup); 182 m_scene.RemoveSceneObject(selectedTree.ParentGroup);
183 m_trees.Remove(selectedTree.ParentGroup.UUID); 183 m_trees.Remove(selectedTree.ParentGroup.UUID);
184 184
185 m_scene.ForEachClient(delegate(IClientAPI controller) 185 m_scene.ForEachClient(delegate(IClientAPI controller)
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 4088746..4885d6d 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -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 AddObjectFromStorage(SceneObjectGroup sceneObject) 189 public 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);
@@ -197,18 +197,18 @@ namespace OpenSim.Region.Environment.Scenes
197 } 197 }
198 sceneObject.UpdateParentIDs(); 198 sceneObject.UpdateParentIDs();
199 199
200 AddObject(sceneObject); 200 AddSceneObject(sceneObject);
201 } 201 }
202 202
203 /// <summary> 203 /// <summary>
204 /// Add an object to the scene. 204 /// Add an object to the scene.
205 /// </summary> 205 /// </summary>
206 /// <param name="sceneObject"></param> 206 /// <param name="sceneObject"></param>
207 public void AddObject(SceneObjectGroup sceneObject) 207 public void AddSceneObject(SceneObjectGroup sceneObject)
208 { 208 {
209 if (!Entities.ContainsKey(sceneObject.UUID)) 209 if (!Entities.ContainsKey(sceneObject.UUID))
210 { 210 {
211 // QuadTree.AddObject(sceneObject); 211 // QuadTree.AddSceneObject(sceneObject);
212 lock (Entities) 212 lock (Entities)
213 { 213 {
214 Entities.Add(sceneObject.UUID, sceneObject); 214 Entities.Add(sceneObject.UUID, sceneObject);
@@ -299,7 +299,7 @@ namespace OpenSim.Region.Environment.Scenes
299 { 299 {
300 if (m_parentScene.ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)obj).UUID, avatar_deleter)) 300 if (m_parentScene.ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)obj).UUID, avatar_deleter))
301 { 301 {
302 m_parentScene.RemoveObject((SceneObjectGroup)obj); 302 m_parentScene.RemoveSceneObject((SceneObjectGroup)obj);
303 m_numPrim--; 303 m_numPrim--;
304 } 304 }
305 return; 305 return;
@@ -307,6 +307,7 @@ namespace OpenSim.Region.Environment.Scenes
307 } 307 }
308 } 308 }
309 } 309 }
310
310 public void DetachObject(uint objectLocalID, IClientAPI remoteClient) 311 public void DetachObject(uint objectLocalID, IClientAPI remoteClient)
311 { 312 {
312 List<EntityBase> EntityList = GetEntities(); 313 List<EntityBase> EntityList = GetEntities();
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 81ab733..816b01d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1502,7 +1502,7 @@ namespace OpenSim.Region.Environment.Scenes
1502 1502
1503 group.ResetIDs(); 1503 group.ResetIDs();
1504 1504
1505 AddObject(group); 1505 AddSceneObject(group);
1506 1506
1507 // if attachment we set it's asset id so object updates can reflect that 1507 // if attachment we set it's asset id so object updates can reflect that
1508 // if not, we set it's position in world. 1508 // if not, we set it's position in world.
@@ -1614,7 +1614,7 @@ namespace OpenSim.Region.Environment.Scenes
1614 } 1614 }
1615 group.ResetIDs(); 1615 group.ResetIDs();
1616 1616
1617 AddObject(group); 1617 AddSceneObject(group);
1618 1618
1619 // Set the startup parameter for on_rez event and llGetStartParameter() function 1619 // Set the startup parameter for on_rez event and llGetStartParameter() function
1620 group.StartParameter = param; 1620 group.StartParameter = param;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 5912c51..e3f219f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1163,7 +1163,7 @@ namespace OpenSim.Region.Environment.Scenes
1163 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID); 1163 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID);
1164 foreach (SceneObjectGroup group in PrimsFromDB) 1164 foreach (SceneObjectGroup group in PrimsFromDB)
1165 { 1165 {
1166 AddObjectFromStorage(group); 1166 AddSceneObjectFromStorage(group);
1167 SceneObjectPart rootPart = group.GetChildPart(group.UUID); 1167 SceneObjectPart rootPart = group.GetChildPart(group.UUID);
1168 rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; 1168 rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted;
1169 rootPart.TrimPermissions(); 1169 rootPart.TrimPermissions();
@@ -1290,7 +1290,7 @@ namespace OpenSim.Region.Environment.Scenes
1290 { 1290 {
1291 SceneObjectGroup sceneOb = 1291 SceneObjectGroup sceneOb =
1292 new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape); 1292 new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
1293 AddObject(sceneOb); 1293 AddSceneObject(sceneOb);
1294 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); 1294 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
1295 // if grass or tree, make phantom 1295 // if grass or tree, make phantom
1296 //rootPart.TrimPermissions(); 1296 //rootPart.TrimPermissions();
@@ -1328,25 +1328,25 @@ namespace OpenSim.Region.Environment.Scenes
1328 /// Add an object into the scene that has come from storage 1328 /// Add an object into the scene that has come from storage
1329 /// </summary> 1329 /// </summary>
1330 /// <param name="sceneObject"></param> 1330 /// <param name="sceneObject"></param>
1331 public void AddObjectFromStorage(SceneObjectGroup sceneObject) 1331 public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject)
1332 { 1332 {
1333 m_innerScene.AddObjectFromStorage(sceneObject); 1333 m_innerScene.AddSceneObjectFromStorage(sceneObject);
1334 } 1334 }
1335 1335
1336 /// <summary> 1336 /// <summary>
1337 /// Add an object to the scene 1337 /// Add an object to the scene
1338 /// </summary> 1338 /// </summary>
1339 /// <param name="sceneObject"></param> 1339 /// <param name="sceneObject"></param>
1340 public void AddObject(SceneObjectGroup sceneObject) 1340 public void AddSceneObject(SceneObjectGroup sceneObject)
1341 { 1341 {
1342 m_innerScene.AddObject(sceneObject); 1342 m_innerScene.AddSceneObject(sceneObject);
1343 } 1343 }
1344 1344
1345 /// <summary> 1345 /// <summary>
1346 /// Remove an object from the scene 1346 /// Remove an object from the scene
1347 /// </summary> 1347 /// </summary>
1348 /// <param name="sceneObject"></param> 1348 /// <param name="sceneObject"></param>
1349 public void RemoveObject(SceneObjectGroup sceneObject) 1349 public void RemoveSceneObject(SceneObjectGroup sceneObject)
1350 { 1350 {
1351 if (Entities.ContainsKey(sceneObject.UUID)) 1351 if (Entities.ContainsKey(sceneObject.UUID))
1352 { 1352 {
@@ -3164,7 +3164,7 @@ namespace OpenSim.Region.Environment.Scenes
3164 3164
3165 lock (Entities) 3165 lock (Entities)
3166 { 3166 {
3167 RemoveObject(group); 3167 RemoveSceneObject(group);
3168 } 3168 }
3169 group.DeleteParts(); 3169 group.DeleteParts();
3170 3170
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 935253f..f4e1ef4 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1841,7 +1841,7 @@ namespace OpenSim.Region.Environment.Scenes
1841 1841
1842 SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart); 1842 SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
1843 1843
1844 m_scene.AddObject(objectGroup); 1844 m_scene.AddSceneObject(objectGroup);
1845 1845
1846 ScheduleGroupForFullUpdate(); 1846 ScheduleGroupForFullUpdate();
1847 } 1847 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs
index 13483bb..742996e 100644
--- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes
72 //if we want this to be a import method then we need new uuids for the object to avoid any clashes 72 //if we want this to be a import method then we need new uuids for the object to avoid any clashes
73 //obj.RegenerateFullIDs(); 73 //obj.RegenerateFullIDs();
74 74
75 m_innerScene.AddObject(obj); 75 m_innerScene.AddSceneObject(obj);
76 76
77 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); 77 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
78 // Apply loadOffsets for load/import and move combinations 78 // Apply loadOffsets for load/import and move combinations
@@ -184,7 +184,7 @@ namespace OpenSim.Region.Environment.Scenes
184 SceneObjectGroup obj = new SceneObjectGroup(xmlData); 184 SceneObjectGroup obj = new SceneObjectGroup(xmlData);
185 LLVector3 receivedVelocity = obj.RootPart.Velocity; 185 LLVector3 receivedVelocity = obj.RootPart.Velocity;
186 //System.Console.WriteLine(obj.RootPart.Velocity.ToString()); 186 //System.Console.WriteLine(obj.RootPart.Velocity.ToString());
187 m_innerScene.AddObjectFromStorage(obj); 187 m_innerScene.AddSceneObjectFromStorage(obj);
188 188
189 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); 189 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
190 bool UsePhysics = (((rootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) > 0) && 190 bool UsePhysics = (((rootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) > 0) &&
diff --git a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
index 5300750..87a5ffc 100644
--- a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
+++ b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Examples.SimpleModule
126 if (m_parts.Count == 1) 126 if (m_parts.Count == 1)
127 { 127 {
128 m_parts.Remove(m_rootPart.UUID); 128 m_parts.Remove(m_rootPart.UUID);
129 m_scene.RemoveObject(this); 129 m_scene.RemoveSceneObject(this);
130 remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId); 130 remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId);
131 remoteClient.AddMoney(50); 131 remoteClient.AddMoney(50);
132 remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", LLUUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); 132 remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", LLUUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
index 4129d61..7be2684 100644
--- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
+++ b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Examples.SimpleModule
76 } 76 }
77 77
78 FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos); 78 FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos);
79 m_scene.AddObject(fileObject); 79 m_scene.AddSceneObject(fileObject);
80 fileObject.ScheduleGroupForFullUpdate(); 80 fileObject.ScheduleGroupForFullUpdate();
81 } 81 }
82 } 82 }
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Examples.SimpleModule
107 ComplexObject complexObject = 107 ComplexObject complexObject =
108 new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), 108 new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
109 pos + posOffset); 109 pos + posOffset);
110 m_scene.AddObject(complexObject); 110 m_scene.AddSceneObject(complexObject);
111 } 111 }
112 } 112 }
113 113
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Examples.SimpleModule
116 SceneObjectGroup sceneObject = 116 SceneObjectGroup sceneObject =
117 new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), 117 new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
118 pos + new LLVector3(1f, 1f, 1f)); 118 pos + new LLVector3(1f, 1f, 1f));
119 m_scene.AddObject(sceneObject); 119 m_scene.AddSceneObject(sceneObject);
120 } 120 }
121 121
122 public void Close() 122 public void Close()