From 16ffc764bf57dcc85461f2e5c6457ee8237e78c9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 13 Jun 2012 23:54:32 +0100 Subject: minor: refactor part of LLClientView.ProcessEntityUpdates() to remove duplicate code --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4e0dadb..85d83f8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3780,16 +3780,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (!canUseImproved && !canUseCompressed) { + ObjectUpdatePacket.ObjectDataBlock updateBlock; + if (update.Entity is ScenePresence) { - objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity)); - objectUpdates.Value.Add(update); + updateBlock = CreateAvatarUpdateBlock((ScenePresence)update.Entity); } else { - objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); - objectUpdates.Value.Add(update); + updateBlock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, AgentId); } + + objectUpdateBlocks.Value.Add(updateBlock); + objectUpdates.Value.Add(update); } else if (!canUseImproved) { @@ -3814,7 +3817,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion Block Construction } - #region Packet Sending ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f); -- cgit v1.1