* 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
parent
79eecd3d25
commit
f3067ce6f9
|
@ -73,6 +73,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
|
m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
|
||||||
|
|
||||||
List<EntityBase> entities = m_scene.GetEntities();
|
List<EntityBase> entities = m_scene.GetEntities();
|
||||||
|
|
||||||
|
foreach (EntityBase entity in entities)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
string serEntities = SerializeObjects(entities);
|
string serEntities = SerializeObjects(entities);
|
||||||
|
|
||||||
if (serEntities != null && serEntities.Length > 0)
|
if (serEntities != null && serEntities.Length > 0)
|
||||||
|
|
|
@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
|
||||||
|
|
||||||
if (Util.RandomClass.NextDouble() < killLikelyhood)
|
if (Util.RandomClass.NextDouble() < killLikelyhood)
|
||||||
{
|
{
|
||||||
m_scene.RemoveObject(selectedTree.ParentGroup);
|
m_scene.RemoveSceneObject(selectedTree.ParentGroup);
|
||||||
m_trees.Remove(selectedTree.ParentGroup.UUID);
|
m_trees.Remove(selectedTree.ParentGroup.UUID);
|
||||||
|
|
||||||
m_scene.ForEachClient(delegate(IClientAPI controller)
|
m_scene.ForEachClient(delegate(IClientAPI controller)
|
||||||
|
|
|
@ -186,7 +186,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// Add an object into the scene that has come from storage
|
/// Add an object into the scene that has come from storage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
public void AddObjectFromStorage(SceneObjectGroup sceneObject)
|
public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject)
|
||||||
{
|
{
|
||||||
sceneObject.RegionHandle = m_regInfo.RegionHandle;
|
sceneObject.RegionHandle = m_regInfo.RegionHandle;
|
||||||
sceneObject.SetScene(m_parentScene);
|
sceneObject.SetScene(m_parentScene);
|
||||||
|
@ -197,18 +197,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
sceneObject.UpdateParentIDs();
|
sceneObject.UpdateParentIDs();
|
||||||
|
|
||||||
AddObject(sceneObject);
|
AddSceneObject(sceneObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add an object to the scene.
|
/// Add an object to the scene.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
public void AddObject(SceneObjectGroup sceneObject)
|
public void AddSceneObject(SceneObjectGroup sceneObject)
|
||||||
{
|
{
|
||||||
if (!Entities.ContainsKey(sceneObject.UUID))
|
if (!Entities.ContainsKey(sceneObject.UUID))
|
||||||
{
|
{
|
||||||
// QuadTree.AddObject(sceneObject);
|
// QuadTree.AddSceneObject(sceneObject);
|
||||||
lock (Entities)
|
lock (Entities)
|
||||||
{
|
{
|
||||||
Entities.Add(sceneObject.UUID, sceneObject);
|
Entities.Add(sceneObject.UUID, sceneObject);
|
||||||
|
@ -299,7 +299,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (m_parentScene.ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)obj).UUID, avatar_deleter))
|
if (m_parentScene.ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)obj).UUID, avatar_deleter))
|
||||||
{
|
{
|
||||||
m_parentScene.RemoveObject((SceneObjectGroup)obj);
|
m_parentScene.RemoveSceneObject((SceneObjectGroup)obj);
|
||||||
m_numPrim--;
|
m_numPrim--;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -307,6 +307,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DetachObject(uint objectLocalID, IClientAPI remoteClient)
|
public void DetachObject(uint objectLocalID, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
List<EntityBase> EntityList = GetEntities();
|
List<EntityBase> EntityList = GetEntities();
|
||||||
|
|
|
@ -1502,7 +1502,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
group.ResetIDs();
|
group.ResetIDs();
|
||||||
|
|
||||||
AddObject(group);
|
AddSceneObject(group);
|
||||||
|
|
||||||
// if attachment we set it's asset id so object updates can reflect that
|
// if attachment we set it's asset id so object updates can reflect that
|
||||||
// if not, we set it's position in world.
|
// if not, we set it's position in world.
|
||||||
|
@ -1614,7 +1614,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
group.ResetIDs();
|
group.ResetIDs();
|
||||||
|
|
||||||
AddObject(group);
|
AddSceneObject(group);
|
||||||
|
|
||||||
// Set the startup parameter for on_rez event and llGetStartParameter() function
|
// Set the startup parameter for on_rez event and llGetStartParameter() function
|
||||||
group.StartParameter = param;
|
group.StartParameter = param;
|
||||||
|
|
|
@ -1163,7 +1163,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID);
|
List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID);
|
||||||
foreach (SceneObjectGroup group in PrimsFromDB)
|
foreach (SceneObjectGroup group in PrimsFromDB)
|
||||||
{
|
{
|
||||||
AddObjectFromStorage(group);
|
AddSceneObjectFromStorage(group);
|
||||||
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||||
rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted;
|
rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted;
|
||||||
rootPart.TrimPermissions();
|
rootPart.TrimPermissions();
|
||||||
|
@ -1290,7 +1290,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
SceneObjectGroup sceneOb =
|
SceneObjectGroup sceneOb =
|
||||||
new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
|
new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
|
||||||
AddObject(sceneOb);
|
AddSceneObject(sceneOb);
|
||||||
SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
|
SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
|
||||||
// if grass or tree, make phantom
|
// if grass or tree, make phantom
|
||||||
//rootPart.TrimPermissions();
|
//rootPart.TrimPermissions();
|
||||||
|
@ -1328,25 +1328,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// Add an object into the scene that has come from storage
|
/// Add an object into the scene that has come from storage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
public void AddObjectFromStorage(SceneObjectGroup sceneObject)
|
public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject)
|
||||||
{
|
{
|
||||||
m_innerScene.AddObjectFromStorage(sceneObject);
|
m_innerScene.AddSceneObjectFromStorage(sceneObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add an object to the scene
|
/// Add an object to the scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
public void AddObject(SceneObjectGroup sceneObject)
|
public void AddSceneObject(SceneObjectGroup sceneObject)
|
||||||
{
|
{
|
||||||
m_innerScene.AddObject(sceneObject);
|
m_innerScene.AddSceneObject(sceneObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove an object from the scene
|
/// Remove an object from the scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
public void RemoveObject(SceneObjectGroup sceneObject)
|
public void RemoveSceneObject(SceneObjectGroup sceneObject)
|
||||||
{
|
{
|
||||||
if (Entities.ContainsKey(sceneObject.UUID))
|
if (Entities.ContainsKey(sceneObject.UUID))
|
||||||
{
|
{
|
||||||
|
@ -3164,7 +3164,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
lock (Entities)
|
lock (Entities)
|
||||||
{
|
{
|
||||||
RemoveObject(group);
|
RemoveSceneObject(group);
|
||||||
}
|
}
|
||||||
group.DeleteParts();
|
group.DeleteParts();
|
||||||
|
|
||||||
|
|
|
@ -1841,7 +1841,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
|
SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
|
||||||
|
|
||||||
m_scene.AddObject(objectGroup);
|
m_scene.AddSceneObject(objectGroup);
|
||||||
|
|
||||||
ScheduleGroupForFullUpdate();
|
ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//if we want this to be a import method then we need new uuids for the object to avoid any clashes
|
//if we want this to be a import method then we need new uuids for the object to avoid any clashes
|
||||||
//obj.RegenerateFullIDs();
|
//obj.RegenerateFullIDs();
|
||||||
|
|
||||||
m_innerScene.AddObject(obj);
|
m_innerScene.AddSceneObject(obj);
|
||||||
|
|
||||||
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
||||||
// Apply loadOffsets for load/import and move combinations
|
// Apply loadOffsets for load/import and move combinations
|
||||||
|
@ -184,7 +184,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
SceneObjectGroup obj = new SceneObjectGroup(xmlData);
|
SceneObjectGroup obj = new SceneObjectGroup(xmlData);
|
||||||
LLVector3 receivedVelocity = obj.RootPart.Velocity;
|
LLVector3 receivedVelocity = obj.RootPart.Velocity;
|
||||||
//System.Console.WriteLine(obj.RootPart.Velocity.ToString());
|
//System.Console.WriteLine(obj.RootPart.Velocity.ToString());
|
||||||
m_innerScene.AddObjectFromStorage(obj);
|
m_innerScene.AddSceneObjectFromStorage(obj);
|
||||||
|
|
||||||
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
||||||
bool UsePhysics = (((rootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) > 0) &&
|
bool UsePhysics = (((rootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) > 0) &&
|
||||||
|
|
|
@ -126,7 +126,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
if (m_parts.Count == 1)
|
if (m_parts.Count == 1)
|
||||||
{
|
{
|
||||||
m_parts.Remove(m_rootPart.UUID);
|
m_parts.Remove(m_rootPart.UUID);
|
||||||
m_scene.RemoveObject(this);
|
m_scene.RemoveSceneObject(this);
|
||||||
remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId);
|
remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId);
|
||||||
remoteClient.AddMoney(50);
|
remoteClient.AddMoney(50);
|
||||||
remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", LLUUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
|
remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", LLUUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
|
||||||
|
|
|
@ -76,7 +76,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos);
|
FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos);
|
||||||
m_scene.AddObject(fileObject);
|
m_scene.AddSceneObject(fileObject);
|
||||||
fileObject.ScheduleGroupForFullUpdate();
|
fileObject.ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
ComplexObject complexObject =
|
ComplexObject complexObject =
|
||||||
new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
||||||
pos + posOffset);
|
pos + posOffset);
|
||||||
m_scene.AddObject(complexObject);
|
m_scene.AddSceneObject(complexObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
SceneObjectGroup sceneObject =
|
SceneObjectGroup sceneObject =
|
||||||
new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
||||||
pos + new LLVector3(1f, 1f, 1f));
|
pos + new LLVector3(1f, 1f, 1f));
|
||||||
m_scene.AddObject(sceneObject);
|
m_scene.AddSceneObject(sceneObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
|
Loading…
Reference in New Issue