From 0b719286a4162d2fe7bb4320999eeb6b3f916280 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 21 May 2008 17:29:03 +0000 Subject: IZ QUATERNION NORMALIZE TO 0? NOWAI! KTHXBYE --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6c891ab..e5fc384 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2057,6 +2057,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity, LLQuaternion rotation) { + if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == rotation.X) + rotation = LLQuaternion.Identity; + ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateAvatarImprovedBlock(localID, position, velocity, rotation); ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); @@ -2145,6 +2148,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId) { + if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == rotation.X) + rotation = LLQuaternion.Identity; + ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); // TODO: don't create new blocks if recycling an old packet outPacket.RegionData.RegionHandle = regionHandle; @@ -2220,6 +2226,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity, byte state, LLUUID AssetId) { + if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == rotation.X) + rotation = LLQuaternion.Identity; ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); // TODO: don't create new blocks if recycling an old packet terse.RegionData.RegionHandle = regionHandle; @@ -2234,6 +2242,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity) { + if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == rotation.X) + rotation = LLQuaternion.Identity; ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); // TODO: don't create new blocks if recycling an old packet terse.RegionData.RegionHandle = regionHandle; -- cgit v1.1