From a0538eb53d8d1d08f4bffb2e9502537dbad3f812 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 7 Aug 2016 20:53:38 +0100 Subject: fix entity update flags update --- OpenSim/Framework/IClientAPI.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 0140733..848d574 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -606,21 +606,20 @@ namespace OpenSim.Framework get { return m_updateTime; } } - public virtual void Update(EntityUpdate update) + public virtual void Update(EntityUpdate oldupdate) { - PrimUpdateFlags updateFlags = update.Flags; - if(updateFlags.HasFlag(PrimUpdateFlags.CancelKill)) + // we are on the new one + PrimUpdateFlags updateFlags = oldupdate.Flags; + if(m_flags.HasFlag(PrimUpdateFlags.CancelKill)) m_flags = PrimUpdateFlags.FullUpdate; - else if(m_flags.HasFlag(PrimUpdateFlags.Kill)) - return; else if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) - m_flags = PrimUpdateFlags.Kill; - else + return; + else // kill case will just merge in m_flags |= updateFlags; // Use the older of the updates as the updateTime - if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0) - m_updateTime = update.UpdateTime; + if (Util.EnvironmentTickCountCompare(UpdateTime, oldupdate.UpdateTime) > 0) + m_updateTime = oldupdate.UpdateTime; } public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags) -- cgit v1.1