* Removing the redundant SendPrimitiveTerseData.State field, it duplicates AttachPoint

* LLClientView.CreateImprovedTerseBlock() now uses AttachPoint and does the proper high-low swap (this should fix disappearing attachment pieces)
0.6.8-post-fixes
John Hurliman 2009-11-09 17:13:56 -08:00
parent a88a463b50
commit 5145dfa53c
3 changed files with 5 additions and 9 deletions

View File

@ -592,7 +592,6 @@ namespace OpenSim.Framework
public readonly Vector3 Velocity; public readonly Vector3 Velocity;
public readonly Vector3 Acceleration; public readonly Vector3 Acceleration;
public readonly Vector3 AngularVelocity; public readonly Vector3 AngularVelocity;
public readonly byte State;
public readonly UUID AssetID; public readonly UUID AssetID;
public readonly UUID OwnerID; public readonly UUID OwnerID;
public readonly int AttachPoint; public readonly int AttachPoint;
@ -600,7 +599,7 @@ namespace OpenSim.Framework
public readonly double Priority; public readonly double Priority;
public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 rotationalvelocity, byte state, Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 rotationalvelocity,
UUID assetID, UUID ownerID, int attachPoint, byte[] textureEntry, double priority) UUID assetID, UUID ownerID, int attachPoint, byte[] textureEntry, double priority)
{ {
RegionHandle = regionHandle; RegionHandle = regionHandle;
@ -611,7 +610,6 @@ namespace OpenSim.Framework
Velocity = velocity; Velocity = velocity;
Acceleration = acceleration; Acceleration = acceleration;
AngularVelocity = rotationalvelocity; AngularVelocity = rotationalvelocity;
State = state;
AssetID = assetID; AssetID = assetID;
OwnerID = ownerID; OwnerID = ownerID;
AttachPoint = attachPoint; AttachPoint = attachPoint;

View File

@ -4037,11 +4037,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(SendPrimitiveTerseData data) protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(SendPrimitiveTerseData data)
{ {
return CreateImprovedTerseBlock(false, data.LocalID, data.State, Vector4.Zero, data.Position, data.Velocity, return CreateImprovedTerseBlock(false, data.LocalID, data.AttachPoint, Vector4.Zero, data.Position, data.Velocity,
data.Acceleration, data.Rotation, data.AngularVelocity, data.TextureEntry); data.Acceleration, data.Rotation, data.AngularVelocity, data.TextureEntry);
} }
protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(bool avatar, uint localID, byte state, protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(bool avatar, uint localID, int attachPoint,
Vector4 collisionPlane, Vector3 position, Vector3 velocity, Vector3 acceleration, Quaternion rotation, Vector4 collisionPlane, Vector3 position, Vector3 velocity, Vector3 acceleration, Quaternion rotation,
Vector3 angularVelocity, byte[] textureEntry) Vector3 angularVelocity, byte[] textureEntry)
{ {
@ -4053,7 +4053,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
pos += 4; pos += 4;
// Avatar/CollisionPlane // Avatar/CollisionPlane
data[pos++] = state; data[pos++] = (byte)((attachPoint % 16) * 16 + (attachPoint / 16)); ;
if (avatar) if (avatar)
{ {
data[pos++] = 1; data[pos++] = 1;

View File

@ -3758,14 +3758,12 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 lPos = OffsetPosition; Vector3 lPos = OffsetPosition;
byte state = Shape.State;
if (IsAttachment) if (IsAttachment)
{ {
if (ParentGroup.RootPart != this) if (ParentGroup.RootPart != this)
return; return;
lPos = ParentGroup.RootPart.AttachedPos; lPos = ParentGroup.RootPart.AttachedPos;
state = (byte)AttachmentPoint;
} }
else else
{ {
@ -3778,7 +3776,7 @@ namespace OpenSim.Region.Framework.Scenes
remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle, remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle,
m_parentGroup.GetTimeDilation(), LocalId, lPos, m_parentGroup.GetTimeDilation(), LocalId, lPos,
RotationOffset, Velocity, Acceleration, RotationOffset, Velocity, Acceleration,
AngularVelocity, state, FromItemID, AngularVelocity, FromItemID,
OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient))); OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient)));
} }