fix entity update flags update

LSLKeyTest
UbitUmarov 2016-08-07 20:53:38 +01:00
parent c255c23981
commit a30f75cfdc
1 changed files with 8 additions and 9 deletions

View File

@ -606,21 +606,20 @@ namespace OpenSim.Framework
get { return m_updateTime; } get { return m_updateTime; }
} }
public virtual void Update(EntityUpdate update) public virtual void Update(EntityUpdate oldupdate)
{ {
PrimUpdateFlags updateFlags = update.Flags; // we are on the new one
if(updateFlags.HasFlag(PrimUpdateFlags.CancelKill)) PrimUpdateFlags updateFlags = oldupdate.Flags;
if(m_flags.HasFlag(PrimUpdateFlags.CancelKill))
m_flags = PrimUpdateFlags.FullUpdate; m_flags = PrimUpdateFlags.FullUpdate;
else if(m_flags.HasFlag(PrimUpdateFlags.Kill))
return;
else if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) else if(updateFlags.HasFlag(PrimUpdateFlags.Kill))
m_flags = PrimUpdateFlags.Kill; return;
else else // kill case will just merge in
m_flags |= updateFlags; m_flags |= updateFlags;
// Use the older of the updates as the updateTime // Use the older of the updates as the updateTime
if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0) if (Util.EnvironmentTickCountCompare(UpdateTime, oldupdate.UpdateTime) > 0)
m_updateTime = update.UpdateTime; m_updateTime = oldupdate.UpdateTime;
} }
public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags) public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags)