From fb694fb177a02199e6a4ff1f48f866d10e2ef29e Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 7 Nov 2008 21:50:03 +0000 Subject: * Rename PrimIDAllocate() to more effectively convey what it does, and put the verb at the front --- OpenSim/Region/Environment/Scenes/Scene.cs | 2 +- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 3931cf0..cb4c2f5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1621,7 +1621,7 @@ namespace OpenSim.Region.Environment.Scenes /// Returns a new unallocated local primitive ID /// /// A brand new local primitive ID - public uint PrimIDAllocate() + public uint AllocateLocalPrimId() { uint myID; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 54ccaad..bb80fd0 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -567,7 +567,7 @@ namespace OpenSim.Region.Environment.Scenes RegionHandle = m_scene.RegionInfo.RegionHandle; m_rootPart.ParentID = 0; - m_rootPart.LocalId = m_scene.PrimIDAllocate(); + m_rootPart.LocalId = m_scene.AllocateLocalPrimId(); // No need to lock here since the object isn't yet in a scene foreach (SceneObjectPart part in m_parts.Values) @@ -575,7 +575,7 @@ namespace OpenSim.Region.Environment.Scenes if (Object.ReferenceEquals(part, m_rootPart)) continue; - part.LocalId = m_scene.PrimIDAllocate(); + part.LocalId = m_scene.AllocateLocalPrimId(); part.ParentID = m_rootPart.LocalId; //m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID); } @@ -1394,7 +1394,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void CopyRootPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) { - SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate(), OwnerID, GroupID, m_parts.Count, userExposed); + SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalPrimId(), OwnerID, GroupID, m_parts.Count, userExposed); newPart.SetParent(this); lock (m_parts) @@ -1514,7 +1514,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) { - SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate(), OwnerID, GroupID, m_parts.Count, userExposed); + SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalPrimId(), OwnerID, GroupID, m_parts.Count, userExposed); newPart.SetParent(this); lock (m_parts) @@ -2676,13 +2676,14 @@ namespace OpenSim.Region.Environment.Scenes scriptPosTarget waypoint = new scriptPosTarget(); waypoint.targetPos = target; waypoint.tolerance = tolerance; - uint handle = m_scene.PrimIDAllocate(); + uint handle = m_scene.AllocateLocalPrimId(); lock (m_targets) { m_targets.Add(handle, waypoint); } return (int)handle; } + public void unregisterTargetWaypoint(int handle) { lock (m_targets) -- cgit v1.1