send actual velocity and angular velocity in terse updates

instead of hardcoding to zero when the primitive is non physical.
llTargetOmega should work now.
0.6.0-stable
Sean Dague 2008-05-06 22:17:00 +00:00
parent be024e1e93
commit 0b09966c7e
4 changed files with 8 additions and 8 deletions

View File

@ -778,7 +778,7 @@ namespace OpenSim.Framework
uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction); uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 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);
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity); LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);

View File

@ -2131,10 +2131,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="position"></param> /// <param name="position"></param>
/// <param name="rotation"></param> /// <param name="rotation"></param>
public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 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); ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
// TODO: don't create new blocks if recycling an old packet // TODO: don't create new blocks if recycling an old packet
terse.RegionData.RegionHandle = regionHandle; terse.RegionData.RegionHandle = regionHandle;

View File

@ -2392,9 +2392,10 @@ namespace OpenSim.Region.Environment.Scenes
LLVector3 lPos; LLVector3 lPos;
lPos = OffsetPosition; lPos = OffsetPosition;
LLQuaternion mRot = RotationOffset; 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) 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 else
{ {
@ -2409,13 +2410,13 @@ namespace OpenSim.Region.Environment.Scenes
LLQuaternion mRot = RotationOffset; LLQuaternion mRot = RotationOffset;
if (m_IsAttachment) 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 else
{ {
if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0) 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 else
{ {

View File

@ -409,7 +409,8 @@ namespace OpenSim.Region.Examples.SimpleModule
{ {
} }
public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 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)
{ {
} }