Restore physics bucket serialization that was lost in previous commit

dsg
Robert Adams 2011-03-03 11:37:24 -08:00
parent b76c233db3
commit 59fbb9cbef
1 changed files with 28 additions and 19 deletions

View File

@ -718,38 +718,44 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
{
updatedPart.UpdateTaintedBucketSyncInfo(bucketName, DateTime.Now.Ticks);
Physics.Manager.PhysicsActor pa = updatedPart.PhysActor;
if (pa == null)
return;
OSDMap data = new OSDMap();
data["UUID"] = OSD.FromUUID(updatedPart.UUID);
// data["UUID"] = OSD.FromUUID(updatedPart.UUID);
data["UUID"] = OSD.FromUUID(pa.UUID);
data["Bucket"] = OSD.FromString(bucketName);
data["GroupPosition"] = OSD.FromVector3(updatedPart.GroupPosition);
data["OffsetPosition"] = OSD.FromVector3(updatedPart.OffsetPosition);
data["RotationOffset"] = OSD.FromQuaternion(updatedPart.RotationOffset);
data["Velocity"] = OSD.FromVector3(updatedPart.Velocity);
data["Scale"] = OSD.FromVector3(updatedPart.Scale);
//Other properties to be included
/*
"Position":
"Size":
"Force":
"RotationalVelocity":
"PA_Acceleration":
"Torque":
"Orientation":
"IsPhysical":
"Flying":
"Buoyancy":
* */
data["AngularVelocity"] = OSD.FromVector3(updatedPart.AngularVelocity);
data["RotationOffset"] = OSD.FromQuaternion(updatedPart.RotationOffset);
data["Size"] = OSD.FromVector3(pa.Size);
data["Position"] = OSD.FromVector3(pa.Position);
data["Force"] = OSD.FromVector3(pa.Force);
data["Velocity"] = OSD.FromVector3(pa.Velocity);
data["RotationalVelocity"] = OSD.FromVector3(pa.RotationalVelocity);
data["PA_Acceleration"] = OSD.FromVector3(pa.Acceleration);
data["Torque"] = OSD.FromVector3(pa.Torque);
data["Orientation"] = OSD.FromQuaternion(pa.Orientation);
data["IsPhysical"] = OSD.FromBoolean(pa.IsPhysical);
data["Flying"] = OSD.FromBoolean(pa.Flying);
data["Kinematic"] = OSD.FromBoolean(pa.Kinematic);
data["Buoyancy"] = OSD.FromReal(pa.Buoyancy);
data["CollidingGround"] = OSD.FromBoolean(pa.CollidingGround);
data["IsColliding"] = OSD.FromBoolean(pa.IsColliding);
data["LastUpdateTimeStamp"] = OSD.FromLong(updatedPart.BucketSyncInfoList[bucketName].LastUpdateTimeStamp);
data["LastUpdateActorID"] = OSD.FromString(updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID);
SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedBucketProperties, OSDParser.SerializeJsonString(data));
m_log.DebugFormat("{0}: PhysBucketSender for {1}, pos={2}", LogHeader, updatedPart.UUID.ToString(), pa.Position.ToString());
SendObjectUpdateToRelevantSyncConnectors(updatedPart, syncMsg);
}
}
//If nothing configured in the config file, this is the default settings for grouping properties into different bucket
private void PopulatePropertyBuketMapByDefault()
{
@ -772,19 +778,22 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
case SceneObjectPartProperties.GroupPosition:
case SceneObjectPartProperties.OffsetPosition:
case SceneObjectPartProperties.Scale:
case SceneObjectPartProperties.Velocity:
case SceneObjectPartProperties.AngularVelocity:
case SceneObjectPartProperties.RotationOffset:
case SceneObjectPartProperties.Position:
case SceneObjectPartProperties.Size:
case SceneObjectPartProperties.Position:
case SceneObjectPartProperties.Force:
case SceneObjectPartProperties.Velocity:
case SceneObjectPartProperties.RotationalVelocity:
case SceneObjectPartProperties.PA_Acceleration:
case SceneObjectPartProperties.Torque:
case SceneObjectPartProperties.Orientation:
case SceneObjectPartProperties.IsPhysical:
case SceneObjectPartProperties.Flying:
case SceneObjectPartProperties.Kinematic:
case SceneObjectPartProperties.Buoyancy:
case SceneObjectPartProperties.IsCollidingGround:
case SceneObjectPartProperties.IsColliding:
m_primPropertyBucketMap.Add(property, physicsBucketName);
break;
default: