From 63d1916f511fdbbec8bc111f4bf80b3e4e0bc267 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 23 Aug 2014 20:59:11 +0100 Subject: Remove entities from updates queues on kill. Do it sync so enqueues after the kill work --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 06f1301..3d02f36 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -1660,6 +1660,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP // foreach (uint id in localIDs) // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle); + // remove pending entities + lock (m_entityProps.SyncRoot) + m_entityProps.Remove(localIDs); + lock (m_entityUpdates.SyncRoot) + m_entityUpdates.Remove(localIDs); + KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); // TODO: don't create new blocks if recycling an old packet kill.ObjectData = new KillObjectPacket.ObjectDataBlock[localIDs.Count]; -- cgit v1.1 From d55041d9349c6d846fc32c01ea28083f40fd4263 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 23 Aug 2014 21:13:30 +0100 Subject: on updates, send rotations using livomv Quaternion.toBytes() again --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 3d02f36..e62bea6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5334,13 +5334,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP Vector3 velocity = new Vector3(0, 0, 0); Vector3 acceleration = new Vector3(0, 0, 0); rotation.Normalize(); - Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z); data.CollisionPlane.ToBytes(objectData, 0); offsetPosition.ToBytes(objectData, 16); velocity.ToBytes(objectData, 28); acceleration.ToBytes(objectData, 40); - vrot.ToBytes(objectData, 52); + rotation.ToBytes(objectData, 52); data.AngularVelocity.ToBytes(objectData, 64); ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); @@ -5400,8 +5399,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Quaternion rotation = data.RotationOffset; rotation.Normalize(); - Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z); - vrot.ToBytes(objectData, 36); + rotation.ToBytes(objectData, 36); data.AngularVelocity.ToBytes(objectData, 48); ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); -- cgit v1.1 From f4a6be86546b3bfeefbdbade33f2faabdd080c1f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 24 Aug 2014 00:44:14 +0100 Subject: clean sendKill a bit, remove a IsChild that is set too early in a calling path --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 24 ++-------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e62bea6..e19877c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -1677,28 +1677,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP kill.Header.Reliable = true; kill.Header.Zerocoded = true; - if (localIDs.Count == 1 && m_scene.GetScenePresence(localIDs[0]) != null) - { - OutPacket(kill, ThrottleOutPacketType.Task); - } - else - { - // We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race - // condition where a kill can be processed before an out-of-date update for the same object. - // ProcessEntityUpdates() also takes the m_killRecord lock. -// lock (m_killRecord) -// { -// foreach (uint localID in localIDs) -// m_killRecord.Add(localID); - - // The throttle queue used here must match that being used for updates. Otherwise, there is a - // chance that a kill packet put on a separate queue will be sent to the client before an existing - // update packet on another queue. Receiving updates after kills results in unowned and undeletable - // scene objects in a viewer until that viewer is relogged in. - OutPacket(kill, ThrottleOutPacketType.Task); -// } - } - } + OutPacket(kill, ThrottleOutPacketType.Task); + } /// /// Send information about the items contained in a folder to the client. -- cgit v1.1