aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs36
1 files changed, 10 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 06f1301..e19877c 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
1660// foreach (uint id in localIDs) 1660// foreach (uint id in localIDs)
1661// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle); 1661// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle);
1662 1662
1663 // remove pending entities
1664 lock (m_entityProps.SyncRoot)
1665 m_entityProps.Remove(localIDs);
1666 lock (m_entityUpdates.SyncRoot)
1667 m_entityUpdates.Remove(localIDs);
1668
1663 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); 1669 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
1664 // TODO: don't create new blocks if recycling an old packet 1670 // TODO: don't create new blocks if recycling an old packet
1665 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[localIDs.Count]; 1671 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[localIDs.Count];
@@ -1671,28 +1677,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1671 kill.Header.Reliable = true; 1677 kill.Header.Reliable = true;
1672 kill.Header.Zerocoded = true; 1678 kill.Header.Zerocoded = true;
1673 1679
1674 if (localIDs.Count == 1 && m_scene.GetScenePresence(localIDs[0]) != null) 1680 OutPacket(kill, ThrottleOutPacketType.Task);
1675 { 1681 }
1676 OutPacket(kill, ThrottleOutPacketType.Task);
1677 }
1678 else
1679 {
1680 // We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race
1681 // condition where a kill can be processed before an out-of-date update for the same object.
1682 // ProcessEntityUpdates() also takes the m_killRecord lock.
1683// lock (m_killRecord)
1684// {
1685// foreach (uint localID in localIDs)
1686// m_killRecord.Add(localID);
1687
1688 // The throttle queue used here must match that being used for updates. Otherwise, there is a
1689 // chance that a kill packet put on a separate queue will be sent to the client before an existing
1690 // update packet on another queue. Receiving updates after kills results in unowned and undeletable
1691 // scene objects in a viewer until that viewer is relogged in.
1692 OutPacket(kill, ThrottleOutPacketType.Task);
1693// }
1694 }
1695 }
1696 1682
1697 /// <summary> 1683 /// <summary>
1698 /// Send information about the items contained in a folder to the client. 1684 /// Send information about the items contained in a folder to the client.
@@ -5328,13 +5314,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5328 Vector3 velocity = new Vector3(0, 0, 0); 5314 Vector3 velocity = new Vector3(0, 0, 0);
5329 Vector3 acceleration = new Vector3(0, 0, 0); 5315 Vector3 acceleration = new Vector3(0, 0, 0);
5330 rotation.Normalize(); 5316 rotation.Normalize();
5331 Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z);
5332 5317
5333 data.CollisionPlane.ToBytes(objectData, 0); 5318 data.CollisionPlane.ToBytes(objectData, 0);
5334 offsetPosition.ToBytes(objectData, 16); 5319 offsetPosition.ToBytes(objectData, 16);
5335 velocity.ToBytes(objectData, 28); 5320 velocity.ToBytes(objectData, 28);
5336 acceleration.ToBytes(objectData, 40); 5321 acceleration.ToBytes(objectData, 40);
5337 vrot.ToBytes(objectData, 52); 5322 rotation.ToBytes(objectData, 52);
5338 data.AngularVelocity.ToBytes(objectData, 64); 5323 data.AngularVelocity.ToBytes(objectData, 64);
5339 5324
5340 ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); 5325 ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock();
@@ -5394,8 +5379,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5394 5379
5395 Quaternion rotation = data.RotationOffset; 5380 Quaternion rotation = data.RotationOffset;
5396 rotation.Normalize(); 5381 rotation.Normalize();
5397 Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z); 5382 rotation.ToBytes(objectData, 36);
5398 vrot.ToBytes(objectData, 36);
5399 data.AngularVelocity.ToBytes(objectData, 48); 5383 data.AngularVelocity.ToBytes(objectData, 48);
5400 5384
5401 ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); 5385 ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock();