mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs OpenSim/Tests/Common/Mock/TestClient.cs
This commit is contained in:
@@ -412,6 +412,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return m_parts.ContainsKey(partID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does this group contain the given part?
|
||||
/// should be able to remove these methods once we have a entity index in scene
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <returns></returns>
|
||||
public bool ContainsPart(uint localID)
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
if (parts[i].LocalId == localID)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <value>
|
||||
/// The root part of this scene object
|
||||
/// </value>
|
||||
@@ -1636,7 +1654,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public UUID GetPartsFullID(uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
return part.UUID;
|
||||
@@ -1652,7 +1670,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localId);
|
||||
SceneObjectPart part = GetPart(localId);
|
||||
OnGrabPart(part, offsetPos, remoteClient);
|
||||
}
|
||||
}
|
||||
@@ -2513,8 +2531,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Get a part with a given UUID
|
||||
/// </summary>
|
||||
/// <param name="primID"></param>
|
||||
/// <returns>null if a child part with the primID was not found</returns>
|
||||
public SceneObjectPart GetChildPart(UUID primID)
|
||||
/// <returns>null if a part with the primID was not found</returns>
|
||||
public SceneObjectPart GetPart(UUID primID)
|
||||
{
|
||||
SceneObjectPart childPart;
|
||||
m_parts.TryGetValue(primID, out childPart);
|
||||
@@ -2525,8 +2543,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Get a part with a given local ID
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <returns>null if a child part with the local ID was not found</returns>
|
||||
public SceneObjectPart GetChildPart(uint localID)
|
||||
/// <returns>null if a part with the local ID was not found</returns>
|
||||
public SceneObjectPart GetPart(uint localID)
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
@@ -2538,35 +2556,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does this group contain the child prim
|
||||
/// should be able to remove these methods once we have a entity index in scene
|
||||
/// </summary>
|
||||
/// <param name="primID"></param>
|
||||
/// <returns></returns>
|
||||
public bool HasChildPrim(UUID primID)
|
||||
{
|
||||
return m_parts.ContainsKey(primID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does this group contain the child prim
|
||||
/// should be able to remove these methods once we have a entity index in scene
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <returns></returns>
|
||||
public bool HasChildPrim(uint localID)
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
if (parts[i].LocalId == localID)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Packet Handlers
|
||||
@@ -2720,7 +2709,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <returns>The object group of the newly delinked prim. Null if part could not be found</returns>
|
||||
public SceneObjectGroup DelinkFromGroup(uint partID, bool sendEvents)
|
||||
{
|
||||
SceneObjectPart linkPart = GetChildPart(partID);
|
||||
SceneObjectPart linkPart = GetPart(partID);
|
||||
|
||||
if (linkPart != null)
|
||||
{
|
||||
@@ -3024,7 +3013,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="localID"></param>
|
||||
public void SetPartName(string name, uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.Name = name;
|
||||
@@ -3033,7 +3022,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void SetPartDescription(string des, uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.Description = des;
|
||||
@@ -3042,7 +3031,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void SetPartText(string text, uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.SetText(text);
|
||||
@@ -3051,7 +3040,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void SetPartText(string text, UUID partID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(partID);
|
||||
SceneObjectPart part = GetPart(partID);
|
||||
if (part != null)
|
||||
{
|
||||
part.SetText(text);
|
||||
@@ -3060,7 +3049,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public string GetPartName(uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
return part.Name;
|
||||
@@ -3070,7 +3059,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public string GetPartDescription(uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
return part.Description;
|
||||
@@ -3088,7 +3077,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="SetVolumeDetect"></param>
|
||||
public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect)
|
||||
{
|
||||
SceneObjectPart selectionPart = GetChildPart(localID);
|
||||
SceneObjectPart selectionPart = GetPart(localID);
|
||||
|
||||
if (SetTemporary && Scene != null)
|
||||
{
|
||||
@@ -3148,7 +3137,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.UpdateExtraParam(type, inUse, data);
|
||||
@@ -3173,7 +3162,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="textureEntry"></param>
|
||||
public void UpdateTextureEntry(uint localID, byte[] textureEntry)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.UpdateTextureEntry(textureEntry);
|
||||
@@ -3205,7 +3194,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="shapeBlock"></param>
|
||||
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
part.UpdateShape(shapeBlock);
|
||||
@@ -3395,7 +3384,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void UpdateSinglePosition(Vector3 pos, uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
|
||||
if (part != null)
|
||||
{
|
||||
@@ -3508,7 +3497,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="localID"></param>
|
||||
public void UpdateSingleRotation(Quaternion rot, uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
|
||||
if (part != null)
|
||||
@@ -3537,7 +3527,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="localID"></param>
|
||||
public void UpdateSingleRotation(Quaternion rot, Vector3 pos, uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
if (m_rootPart.PhysActor != null)
|
||||
|
||||
Reference in New Issue
Block a user