* Refactor: Renaming various *Entity*() methods to *Object*() methods on the basis that they all take SOG parameters to improve code readability for now
parent
42693f3b20
commit
79eecd3d25
|
@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
|
|||
|
||||
if (Util.RandomClass.NextDouble() < killLikelyhood)
|
||||
{
|
||||
m_scene.RemoveEntity(selectedTree.ParentGroup);
|
||||
m_scene.RemoveObject(selectedTree.ParentGroup);
|
||||
m_trees.Remove(selectedTree.ParentGroup.UUID);
|
||||
|
||||
m_scene.ForEachClient(delegate(IClientAPI controller)
|
||||
|
|
|
@ -182,7 +182,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
#region Entity Methods
|
||||
|
||||
public void AddEntityFromStorage(SceneObjectGroup sceneObject)
|
||||
/// <summary>
|
||||
/// Add an object into the scene that has come from storage
|
||||
/// </summary>
|
||||
/// <param name="sceneObject"></param>
|
||||
public void AddObjectFromStorage(SceneObjectGroup sceneObject)
|
||||
{
|
||||
sceneObject.RegionHandle = m_regInfo.RegionHandle;
|
||||
sceneObject.SetScene(m_parentScene);
|
||||
|
@ -192,10 +196,15 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
}
|
||||
sceneObject.UpdateParentIDs();
|
||||
AddEntity(sceneObject);
|
||||
|
||||
AddObject(sceneObject);
|
||||
}
|
||||
|
||||
public void AddEntity(SceneObjectGroup sceneObject)
|
||||
/// <summary>
|
||||
/// Add an object to the scene.
|
||||
/// </summary>
|
||||
/// <param name="sceneObject"></param>
|
||||
public void AddObject(SceneObjectGroup sceneObject)
|
||||
{
|
||||
if (!Entities.ContainsKey(sceneObject.UUID))
|
||||
{
|
||||
|
@ -290,7 +299,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
if (m_parentScene.ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)obj).UUID, avatar_deleter))
|
||||
{
|
||||
m_parentScene.RemoveEntity((SceneObjectGroup)obj);
|
||||
m_parentScene.RemoveObject((SceneObjectGroup)obj);
|
||||
m_numPrim--;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -1501,7 +1501,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
group.ResetIDs();
|
||||
AddEntity(group);
|
||||
|
||||
AddObject(group);
|
||||
|
||||
// if attachment we set it's asset id so object updates can reflect that
|
||||
// if not, we set it's position in world.
|
||||
|
@ -1612,7 +1613,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
return null;
|
||||
}
|
||||
group.ResetIDs();
|
||||
AddEntity(group);
|
||||
|
||||
AddObject(group);
|
||||
|
||||
// Set the startup parameter for on_rez event and llGetStartParameter() function
|
||||
group.StartParameter = param;
|
||||
|
|
|
@ -1163,7 +1163,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID);
|
||||
foreach (SceneObjectGroup group in PrimsFromDB)
|
||||
{
|
||||
AddEntityFromStorage(group);
|
||||
AddObjectFromStorage(group);
|
||||
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||
rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted;
|
||||
rootPart.TrimPermissions();
|
||||
|
@ -1290,7 +1290,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
SceneObjectGroup sceneOb =
|
||||
new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
|
||||
AddEntity(sceneOb);
|
||||
AddObject(sceneOb);
|
||||
SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
|
||||
// if grass or tree, make phantom
|
||||
//rootPart.TrimPermissions();
|
||||
|
@ -1324,17 +1324,29 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
m_innerScene.RemovePrim(localID, avatar_deleter);
|
||||
}
|
||||
|
||||
public void AddEntityFromStorage(SceneObjectGroup sceneObject)
|
||||
/// <summary>
|
||||
/// Add an object into the scene that has come from storage
|
||||
/// </summary>
|
||||
/// <param name="sceneObject"></param>
|
||||
public void AddObjectFromStorage(SceneObjectGroup sceneObject)
|
||||
{
|
||||
m_innerScene.AddEntityFromStorage(sceneObject);
|
||||
m_innerScene.AddObjectFromStorage(sceneObject);
|
||||
}
|
||||
|
||||
public void AddEntity(SceneObjectGroup sceneObject)
|
||||
/// <summary>
|
||||
/// Add an object to the scene
|
||||
/// </summary>
|
||||
/// <param name="sceneObject"></param>
|
||||
public void AddObject(SceneObjectGroup sceneObject)
|
||||
{
|
||||
m_innerScene.AddEntity(sceneObject);
|
||||
m_innerScene.AddObject(sceneObject);
|
||||
}
|
||||
|
||||
public void RemoveEntity(SceneObjectGroup sceneObject)
|
||||
/// <summary>
|
||||
/// Remove an object from the scene
|
||||
/// </summary>
|
||||
/// <param name="sceneObject"></param>
|
||||
public void RemoveObject(SceneObjectGroup sceneObject)
|
||||
{
|
||||
if (Entities.ContainsKey(sceneObject.UUID))
|
||||
{
|
||||
|
@ -3152,7 +3164,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
lock (Entities)
|
||||
{
|
||||
RemoveEntity(group);
|
||||
RemoveObject(group);
|
||||
}
|
||||
group.DeleteParts();
|
||||
|
||||
|
|
|
@ -1841,7 +1841,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
|
||||
|
||||
m_scene.AddEntity(objectGroup);
|
||||
m_scene.AddObject(objectGroup);
|
||||
|
||||
ScheduleGroupForFullUpdate();
|
||||
}
|
||||
|
|
|
@ -71,7 +71,8 @@ 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
|
||||
//obj.RegenerateFullIDs();
|
||||
m_innerScene.AddEntity(obj);
|
||||
|
||||
m_innerScene.AddObject(obj);
|
||||
|
||||
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
||||
// Apply loadOffsets for load/import and move combinations
|
||||
|
@ -183,7 +184,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
SceneObjectGroup obj = new SceneObjectGroup(xmlData);
|
||||
LLVector3 receivedVelocity = obj.RootPart.Velocity;
|
||||
//System.Console.WriteLine(obj.RootPart.Velocity.ToString());
|
||||
m_innerScene.AddEntityFromStorage(obj);
|
||||
m_innerScene.AddObjectFromStorage(obj);
|
||||
|
||||
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
|
||||
bool UsePhysics = (((rootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) > 0) &&
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
if (m_parts.Count == 1)
|
||||
{
|
||||
m_parts.Remove(m_rootPart.UUID);
|
||||
m_scene.RemoveEntity(this);
|
||||
m_scene.RemoveObject(this);
|
||||
remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId);
|
||||
remoteClient.AddMoney(50);
|
||||
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);
|
||||
m_scene.AddEntity(fileObject);
|
||||
m_scene.AddObject(fileObject);
|
||||
fileObject.ScheduleGroupForFullUpdate();
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
ComplexObject complexObject =
|
||||
new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
||||
pos + posOffset);
|
||||
m_scene.AddEntity(complexObject);
|
||||
m_scene.AddObject(complexObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
SceneObjectGroup sceneObject =
|
||||
new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
||||
pos + new LLVector3(1f, 1f, 1f));
|
||||
m_scene.AddEntity(sceneObject);
|
||||
m_scene.AddObject(sceneObject);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
|
Loading…
Reference in New Issue