Fixed the update of items in the priority queue to enable both

types of property updates to be specified. Not sure if one form
of property update should supercede another. But for now the old
OpenSim behavior is preserved by sending both.
bulletsim
Mic Bowman 2011-04-12 15:40:57 -07:00
parent 1a0f107012
commit 78c04d61ca
3 changed files with 21 additions and 7 deletions

View File

@ -575,6 +575,11 @@ namespace OpenSim.Framework
public ISceneEntity Entity;
public uint Flags;
public virtual void Update(IEntityUpdate update)
{
this.Flags |= update.Flags;
}
public IEntityUpdate(ISceneEntity entity, uint flags)
{
Entity = entity;

View File

@ -4032,26 +4032,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private class ObjectPropertyUpdate : IEntityUpdate
{
internal bool SendFamilyProps;
internal bool SendObjectProps;
public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam)
public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj)
: base(entity,flags)
{
SendFamilyProps = sendfam;
SendObjectProps = sendobj;
}
public void Update(ObjectPropertyUpdate update)
{
SendFamilyProps = SendFamilyProps || update.SendFamilyProps;
SendObjectProps = SendObjectProps || update.SendObjectProps;
Flags |= update.Flags;
}
}
public void SendObjectPropertiesFamilyData(ISceneEntity entity, uint requestFlags)
{
uint priority = m_prioritizer.GetUpdatePriority(this, entity);
uint priority = 0; // time based ordering only
lock (m_entityProps.SyncRoot)
m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,requestFlags,true));
m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,requestFlags,true,false));
}
public void SendObjectPropertiesReply(ISceneEntity entity)
{
uint priority = m_prioritizer.GetUpdatePriority(this, entity);
uint priority = 0; // time based ordering only
lock (m_entityProps.SyncRoot)
m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,0,false));
m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,0,false,true));
}
private void ProcessEntityPropertyRequests(int maxUpdates)
@ -4082,7 +4090,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
objectFamilyBlocks.Value.Add(objPropDB);
}
}
else
if (update.SendObjectProps)
{
if (update.Entity is SceneObjectPart)
{

View File

@ -87,7 +87,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_lookupTable.TryGetValue(localid, out lookup))
{
entry = lookup.Heap[lookup.Handle].EntryOrder;
value.Flags |= lookup.Heap[lookup.Handle].Value.Flags;
value.Update(lookup.Heap[lookup.Handle].Value);
lookup.Heap.Remove(lookup.Handle);
}