From 0b09966c7ef63a6f01c799c13963c91b50140453 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 6 May 2008 22:17:00 +0000 Subject: send actual velocity and angular velocity in terse updates instead of hardcoding to zero when the primitive is non physical. llTargetOmega should work now. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 4 +--- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 7 ++++--- OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 85992b2..f5d4ad3 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2131,10 +2131,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, - LLQuaternion rotation, byte state, LLUUID AssetId) + LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity, byte state, LLUUID AssetId) { - LLVector3 velocity = new LLVector3(0f, 0f, 0f); - LLVector3 rotationalvelocity = new LLVector3(0f, 0f, 0f); ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); // TODO: don't create new blocks if recycling an old packet terse.RegionData.RegionHandle = regionHandle; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 9311904..3252b6c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -2392,9 +2392,10 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 lPos; lPos = OffsetPosition; LLQuaternion mRot = RotationOffset; + // TODO: I have no idea why we are making this check. This should be sorted out if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) { - remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Shape.State, fromAssetID); + remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Velocity, RotationalVelocity, Shape.State, fromAssetID); } else { @@ -2409,13 +2410,13 @@ namespace OpenSim.Region.Environment.Scenes LLQuaternion mRot = RotationOffset; if (m_IsAttachment) { - remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, (byte)((m_attachmentPoint % 16) * 16 + (m_attachmentPoint / 16)),fromAssetID); + remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Velocity, RotationalVelocity, (byte)((m_attachmentPoint % 16) * 16 + (m_attachmentPoint / 16)),fromAssetID); } else { if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0) { - remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Shape.State, fromAssetID); + remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Velocity, RotationalVelocity, Shape.State, fromAssetID); } else { diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 25622d2..f457773 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -409,7 +409,8 @@ namespace OpenSim.Region.Examples.SimpleModule { } public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, - LLVector3 position, LLQuaternion rotation, byte state, LLUUID AssetId) + LLVector3 position, LLQuaternion rotation, LLVector3 velocity, + LLVector3 rotationalvelocity, byte state, LLUUID AssetId) { } -- cgit v1.1