Fix a bug where the non-root parts of rezzed objects that had previously been attachments were sending their old attachment values to the client.

The root part state is the canonical value, so always send that instead.
Sending conflicting attachments states for non-root parts of a rezzed object is enough to crash the client.
Fixes http://opensimulator.org/mantis/view.php?id=5664.
Many thanks to mewtwo0641 for some fantastic qa work on this one.
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-08-31 23:33:01 +01:00
parent ca9a054bba
commit 083ba72b28
1 changed files with 12 additions and 1 deletions

View File

@ -4761,6 +4761,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else else
attachPoint = 0; attachPoint = 0;
// m_log.DebugFormat(
// "[LLCLIENTVIEW]: Sending attachPoint {0} for {1} {2} to {3}",
// attachPoint, part.Name, part.LocalId, Name);
collisionPlane = Vector4.Zero; collisionPlane = Vector4.Zero;
position = part.RelativePosition; position = part.RelativePosition;
velocity = part.Velocity; velocity = part.Velocity;
@ -4925,9 +4929,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else else
{ {
update.NameValue = Utils.EmptyBytes; update.NameValue = Utils.EmptyBytes;
update.State = data.Shape.State;
// The root part state is the canonical state for all parts of the object. The other part states in the
// case for attachments may contain conflicting values that can end up crashing the viewer.
update.State = data.ParentGroup.RootPart.Shape.State;
} }
// m_log.DebugFormat(
// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}",
// update.State, data.Name, data.LocalId, Name);
update.ObjectData = objectData; update.ObjectData = objectData;
update.ParentID = data.ParentID; update.ParentID = data.ParentID;
update.PathBegin = data.Shape.PathBegin; update.PathBegin = data.Shape.PathBegin;