minor: refactor part of LLClientView.ProcessEntityUpdates() to remove duplicate code

0.7.4.1
Justin Clark-Casey (justincc) 2012-06-13 23:54:32 +01:00
parent cf080a68d6
commit 16ffc764bf
1 changed files with 7 additions and 5 deletions

View File

@ -3780,16 +3780,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (!canUseImproved && !canUseCompressed) if (!canUseImproved && !canUseCompressed)
{ {
ObjectUpdatePacket.ObjectDataBlock updateBlock;
if (update.Entity is ScenePresence) if (update.Entity is ScenePresence)
{ {
objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity)); updateBlock = CreateAvatarUpdateBlock((ScenePresence)update.Entity);
objectUpdates.Value.Add(update);
} }
else else
{ {
objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); updateBlock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, AgentId);
objectUpdates.Value.Add(update);
} }
objectUpdateBlocks.Value.Add(updateBlock);
objectUpdates.Value.Add(update);
} }
else if (!canUseImproved) else if (!canUseImproved)
{ {
@ -3815,7 +3818,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Block Construction #endregion Block Construction
} }
#region Packet Sending #region Packet Sending
ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f); ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f);