mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
more agreesing inline
This commit is contained in:
@@ -35,6 +35,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
using PermissionMask = OpenSim.Framework.PermissionMask;
|
||||
@@ -310,7 +311,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <summary>
|
||||
/// Is this scene object acting as an attachment?
|
||||
/// </summary>
|
||||
public bool IsAttachment { get; set; }
|
||||
public bool IsAttachment
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The avatar to which this scene object is attached.
|
||||
@@ -328,6 +335,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </remarks>
|
||||
public uint AttachmentPoint
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
return m_rootPart.Shape.State;
|
||||
@@ -380,6 +388,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </remarks>
|
||||
public bool IsPhantom
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return (RootPart.Flags & PrimFlags.Phantom) != 0; }
|
||||
}
|
||||
|
||||
@@ -391,6 +400,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </remarks>
|
||||
public bool UsesPhysics
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return (RootPart.Flags & PrimFlags.Physics) != 0; }
|
||||
}
|
||||
|
||||
@@ -403,11 +413,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </remarks>
|
||||
public bool IsTemporary
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return (RootPart.Flags & PrimFlags.TemporaryOnRez) != 0; }
|
||||
}
|
||||
|
||||
public bool IsVolumeDetect
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return RootPart.VolumeDetectActive; }
|
||||
}
|
||||
|
||||
@@ -428,11 +440,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public Dictionary<int, scriptPosTarget> AtTargets
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_targets; }
|
||||
}
|
||||
|
||||
public Dictionary<int, scriptRotTarget> RotTargets
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rotTargets; }
|
||||
}
|
||||
|
||||
@@ -454,12 +468,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
public override string Name
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return RootPart.Name; }
|
||||
set { RootPart.Name = value; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return RootPart.Description; }
|
||||
set { RootPart.Description = value; }
|
||||
}
|
||||
@@ -478,6 +494,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
public int PrimCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_parts.Count; }
|
||||
}
|
||||
|
||||
@@ -491,6 +508,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public Quaternion GroupRotation
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.RotationOffset; }
|
||||
}
|
||||
|
||||
@@ -544,15 +562,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public UUID GroupID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.GroupID; }
|
||||
set { m_rootPart.GroupID = value; }
|
||||
}
|
||||
|
||||
public SceneObjectPart[] Parts
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_parts.GetArray(); }
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool ContainsPart(UUID partID)
|
||||
{
|
||||
return m_parts.ContainsKey(partID);
|
||||
@@ -579,11 +600,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </value>
|
||||
public SceneObjectPart RootPart
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart; }
|
||||
}
|
||||
|
||||
public ulong RegionHandle
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_regionHandle; }
|
||||
set
|
||||
{
|
||||
@@ -605,6 +628,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// propertly reflects the underlying status.
|
||||
/// </remarks>
|
||||
/// <returns></returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool IsAttachmentCheckFull()
|
||||
{
|
||||
return (IsAttachment ||
|
||||
@@ -627,6 +651,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
public override Vector3 AbsolutePosition
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.GroupPosition; }
|
||||
set
|
||||
{
|
||||
@@ -1167,18 +1192,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public override Vector3 Velocity
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return RootPart.Velocity; }
|
||||
set { RootPart.Velocity = value; }
|
||||
}
|
||||
|
||||
public override uint LocalId
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.LocalId; }
|
||||
set { m_rootPart.LocalId = value; }
|
||||
}
|
||||
|
||||
public override UUID UUID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.UUID; }
|
||||
set
|
||||
{
|
||||
@@ -1193,36 +1221,42 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public UUID LastOwnerID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.LastOwnerID; }
|
||||
set { m_rootPart.LastOwnerID = value; }
|
||||
}
|
||||
|
||||
public UUID RezzerID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.RezzerID; }
|
||||
set { m_rootPart.RezzerID = value; }
|
||||
}
|
||||
|
||||
public UUID OwnerID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.OwnerID; }
|
||||
set { m_rootPart.OwnerID = value; }
|
||||
}
|
||||
|
||||
public float Damage
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.Damage; }
|
||||
set { m_rootPart.Damage = value; }
|
||||
}
|
||||
|
||||
public Color Color
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_rootPart.Color; }
|
||||
set { m_rootPart.Color = value; }
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
return m_rootPart.Text.Length > 255 ? m_rootPart.Text[..255] : m_rootPart.Text;
|
||||
@@ -1236,11 +1270,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
protected virtual bool CanBeBackedUp
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get { return m_isSelected; }
|
||||
set
|
||||
{
|
||||
@@ -1314,6 +1350,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
public UUID RegionUUID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
return m_scene is not null ? m_scene.RegionInfo.RegionID : UUID.Zero;
|
||||
@@ -1935,6 +1972,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public byte GetAttachmentPoint()
|
||||
{
|
||||
return m_rootPart.Shape.State;
|
||||
@@ -2123,6 +2161,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
part.OnGrab(offsetPos, remoteClient);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public virtual void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
m_scene.EventManager.TriggerGroupGrab(UUID, offsetPos, remoteClient.AgentId);
|
||||
@@ -2177,13 +2216,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void AddScriptLPS(int count)
|
||||
{
|
||||
//legacy
|
||||
//m_scene.SceneGraph.AddToScriptLPS(count);
|
||||
}
|
||||
|
||||
public void AddActiveScriptCount(int count)
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void AddActiveScriptCount(int count)
|
||||
{
|
||||
SceneGraph d = m_scene.SceneGraph;
|
||||
d.AddActiveScripts(count);
|
||||
@@ -2296,17 +2337,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void SetOwnerId(UUID userId)
|
||||
{
|
||||
ForEachPart(delegate(SceneObjectPart part)
|
||||
ForEachPart(delegate(SceneObjectPart part)
|
||||
{
|
||||
if (part.OwnerID.NotEqual(userId))
|
||||
{
|
||||
if (part.OwnerID.NotEqual(userId))
|
||||
{
|
||||
if(part.GroupID.NotEqual(part.OwnerID))
|
||||
part.LastOwnerID = part.OwnerID;
|
||||
part.OwnerID = userId;
|
||||
}
|
||||
});
|
||||
if(part.GroupID.NotEqual(part.OwnerID))
|
||||
part.LastOwnerID = part.OwnerID;
|
||||
part.OwnerID = userId;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ForEachPart(Action<SceneObjectPart> whatToDo)
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
@@ -3013,12 +3055,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
RootPart.SendTerseUpdateToAllClients();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void QueueForUpdateCheck()
|
||||
{
|
||||
if (m_scene is null) // Need to check here as it's null during object creation
|
||||
return;
|
||||
|
||||
m_scene.SceneGraph.AddToUpdateList(this);
|
||||
m_scene?.SceneGraph.AddToUpdateList(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -3091,6 +3131,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
/// <param name="primID"></param>
|
||||
/// <returns>null if a part with the primID was not found</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public SceneObjectPart GetPart(UUID primID)
|
||||
{
|
||||
if(m_parts.TryGetValue(primID, out SceneObjectPart childPart))
|
||||
@@ -3123,6 +3164,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// FIXME: There are places where scripts call these methods directly without locking. This is a potential race condition.
|
||||
/// </remarks>
|
||||
/// <param name="objectGroup">The group of prims which should be linked to this group</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void LinkToGroup(SceneObjectGroup objectGroup)
|
||||
{
|
||||
LinkToGroup(objectGroup, false);
|
||||
@@ -3347,6 +3389,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </remarks>
|
||||
/// <param name="partID"></param>
|
||||
/// <returns>The object group of the newly delinked prim. Null if part could not be found</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public SceneObjectGroup DelinkFromGroup(uint partID)
|
||||
{
|
||||
return DelinkFromGroup(partID, true);
|
||||
@@ -3822,6 +3865,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// As with dragging, scripted objects must be blocked from spinning
|
||||
/// </summary>
|
||||
/// <param name="newOrientation">New Rotation</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private void NonPhysicalSpinMovement(Quaternion newOrientation)
|
||||
{
|
||||
if(!IsAttachment && ScriptCount() == 0)
|
||||
@@ -3863,7 +3907,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
part?.SetText(text);
|
||||
}
|
||||
|
||||
public string GetPartName(uint localID)
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public string GetPartName(uint localID)
|
||||
{
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
return part is not null ? part.Name : string.Empty;
|
||||
@@ -3956,6 +4001,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_scene.EventManager.TriggerParcelPrimCountTainted();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data)
|
||||
{
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
@@ -3966,9 +4012,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Gets the number of parts
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetPartCount()
|
||||
{
|
||||
return Parts.Length;
|
||||
return m_parts.Count;
|
||||
}
|
||||
|
||||
public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive)
|
||||
@@ -5275,6 +5322,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
/// <remarks>This applies to all sitting avatars whether there is a sit target set or not.</remarks>
|
||||
/// <returns></returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetSittingAvatarsCount()
|
||||
{
|
||||
lock (m_sittingAvatars)
|
||||
|
||||
Reference in New Issue
Block a user