In SOG.UpdateGroupPosition, added AttachedPos as an updated property is the object is an attachment.

dsg
Huaiyu (Kitty) Liu 2011-02-16 16:57:47 -08:00
parent 7b9bd89a5c
commit 3d1048f1e2
2 changed files with 7 additions and 2 deletions

View File

@ -2909,7 +2909,12 @@ namespace OpenSim.Region.Framework.Scenes
//we need to do a terse update even if the move wasn't allowed
// so that the position is reset in the client (the object snaps back)
//ScheduleGroupForTerseUpdate();
ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.GroupPosition});
List<SceneObjectPartProperties> updatedProperties = new List<SceneObjectPartProperties>() { SceneObjectPartProperties.GroupPosition };
if (IsAttachment)
{
updatedProperties.Add(SceneObjectPartProperties.AttachedPos);
}
ScheduleGroupForTerseUpdate(updatedProperties);
}
/// <summary>

View File

@ -1288,7 +1288,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
WriteUUID(writer, "AttachedAvatar", sop.AttachedAvatar, options);
WriteVector(writer, "AttachedPos", sop.AttachedPos);
writer.WriteElementString("AttachmentPoint", sop.AttachmentPoint.ToString());
writer.WriteElementString("IsAttachment", sop.IsAttachment.ToString().ToLower()); //IsAttachment is written last, so that on deserialization, it will be deserialized later than other Attachment properties
//writer.WriteElementString("IsAttachment", sop.IsAttachment.ToString().ToLower()); //IsAttachment is written last, so that on deserialization, it will be deserialized later than other Attachment properties
WriteFlags(writer, "AggregateScriptEvents", sop.AggregateScriptEvents.ToString(), options);
WriteBucketSyncInfo(writer, sop.BucketSyncInfoList);
//end of SYMMETRIC SYNC