make it ugly

This commit is contained in:
UbitUmarov
2020-09-19 02:30:22 +01:00
parent fcb349bc5e
commit 1cea3181dc
2 changed files with 52 additions and 68 deletions

View File

@@ -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);
}
}