mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
make it ugly
This commit is contained in:
@@ -46,30 +46,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
NoObject = unchecked((byte)~Object)
|
||||
}
|
||||
|
||||
public class EntityUpdate : IComparable<EntityUpdate>
|
||||
public class EntityUpdate
|
||||
{
|
||||
|
||||
// for priority queue
|
||||
public int PriorityQueue;
|
||||
public int PriorityQueueIndex;
|
||||
private ulong m_entryorder;
|
||||
public ulong EntryOrder;
|
||||
|
||||
private ISceneEntity m_entity;
|
||||
private PrimUpdateFlags m_flags;
|
||||
public ObjectPropertyUpdateFlags m_propsFlags;
|
||||
|
||||
public ulong EntryOrder
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_entryorder;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_entryorder = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ObjectPropertyUpdateFlags PropsFlags
|
||||
{
|
||||
get
|
||||
@@ -100,6 +87,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
set { m_flags = value; }
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Update(int pqueue, ulong entry)
|
||||
{
|
||||
if ((m_flags & PrimUpdateFlags.CancelKill) != 0)
|
||||
@@ -111,35 +99,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
PriorityQueue = pqueue;
|
||||
m_entryorder = entry;
|
||||
}
|
||||
|
||||
public void Update(EntityUpdate oldupdate, int pqueue, ulong entry)
|
||||
{
|
||||
// we are on the new one
|
||||
m_propsFlags |= oldupdate.PropsFlags;
|
||||
|
||||
PrimUpdateFlags updateFlags = oldupdate.Flags;
|
||||
if ((m_flags & PrimUpdateFlags.UpdateProbe) != 0)
|
||||
updateFlags &= ~PrimUpdateFlags.UpdateProbe;
|
||||
|
||||
if ((m_flags & PrimUpdateFlags.CancelKill) != 0)
|
||||
{
|
||||
if ((m_flags & PrimUpdateFlags.UpdateProbe) != 0)
|
||||
m_flags = PrimUpdateFlags.UpdateProbe;
|
||||
else
|
||||
m_flags = PrimUpdateFlags.FullUpdatewithAnim;
|
||||
}
|
||||
else
|
||||
m_flags |= updateFlags;
|
||||
|
||||
PriorityQueue = pqueue;
|
||||
m_entryorder = entry;
|
||||
EntryOrder = entry;
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void UpdateFromNew(EntityUpdate newupdate, int pqueue)
|
||||
{
|
||||
// we are on the new one
|
||||
m_propsFlags |= newupdate.PropsFlags;
|
||||
PrimUpdateFlags newFlags = newupdate.Flags;
|
||||
|
||||
@@ -159,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
PriorityQueue = pqueue;
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public void Free()
|
||||
{
|
||||
m_entity = null;
|
||||
@@ -186,14 +152,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("[{0},{1},{2}]", PriorityQueue, m_entryorder, m_entity.LocalId);
|
||||
}
|
||||
|
||||
public int CompareTo(EntityUpdate other)
|
||||
{
|
||||
// I'm assuming that the root part of an SOG is added to the update queue
|
||||
// before the component parts
|
||||
return Comparer<ulong>.Default.Compare(this.EntryOrder, other.EntryOrder);
|
||||
return String.Format("[{0},{1},{2}]", PriorityQueue, EntryOrder, m_entity.LocalId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user