Restore physics bucket serialization that was lost in previous commit
parent
b76c233db3
commit
59fbb9cbef
|
@ -718,38 +718,44 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
{
|
{
|
||||||
updatedPart.UpdateTaintedBucketSyncInfo(bucketName, DateTime.Now.Ticks);
|
updatedPart.UpdateTaintedBucketSyncInfo(bucketName, DateTime.Now.Ticks);
|
||||||
|
|
||||||
|
Physics.Manager.PhysicsActor pa = updatedPart.PhysActor;
|
||||||
|
if (pa == null)
|
||||||
|
return;
|
||||||
|
|
||||||
OSDMap data = new OSDMap();
|
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["Bucket"] = OSD.FromString(bucketName);
|
||||||
|
|
||||||
data["GroupPosition"] = OSD.FromVector3(updatedPart.GroupPosition);
|
data["GroupPosition"] = OSD.FromVector3(updatedPart.GroupPosition);
|
||||||
data["OffsetPosition"] = OSD.FromVector3(updatedPart.OffsetPosition);
|
data["OffsetPosition"] = OSD.FromVector3(updatedPart.OffsetPosition);
|
||||||
data["RotationOffset"] = OSD.FromQuaternion(updatedPart.RotationOffset);
|
|
||||||
data["Velocity"] = OSD.FromVector3(updatedPart.Velocity);
|
|
||||||
data["Scale"] = OSD.FromVector3(updatedPart.Scale);
|
data["Scale"] = OSD.FromVector3(updatedPart.Scale);
|
||||||
//Other properties to be included
|
data["AngularVelocity"] = OSD.FromVector3(updatedPart.AngularVelocity);
|
||||||
/*
|
data["RotationOffset"] = OSD.FromQuaternion(updatedPart.RotationOffset);
|
||||||
"Position":
|
data["Size"] = OSD.FromVector3(pa.Size);
|
||||||
"Size":
|
data["Position"] = OSD.FromVector3(pa.Position);
|
||||||
"Force":
|
data["Force"] = OSD.FromVector3(pa.Force);
|
||||||
"RotationalVelocity":
|
data["Velocity"] = OSD.FromVector3(pa.Velocity);
|
||||||
"PA_Acceleration":
|
data["RotationalVelocity"] = OSD.FromVector3(pa.RotationalVelocity);
|
||||||
"Torque":
|
data["PA_Acceleration"] = OSD.FromVector3(pa.Acceleration);
|
||||||
"Orientation":
|
data["Torque"] = OSD.FromVector3(pa.Torque);
|
||||||
"IsPhysical":
|
data["Orientation"] = OSD.FromQuaternion(pa.Orientation);
|
||||||
"Flying":
|
data["IsPhysical"] = OSD.FromBoolean(pa.IsPhysical);
|
||||||
"Buoyancy":
|
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["LastUpdateTimeStamp"] = OSD.FromLong(updatedPart.BucketSyncInfoList[bucketName].LastUpdateTimeStamp);
|
||||||
data["LastUpdateActorID"] = OSD.FromString(updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID);
|
data["LastUpdateActorID"] = OSD.FromString(updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID);
|
||||||
|
|
||||||
SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedBucketProperties, OSDParser.SerializeJsonString(data));
|
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);
|
SendObjectUpdateToRelevantSyncConnectors(updatedPart, syncMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//If nothing configured in the config file, this is the default settings for grouping properties into different bucket
|
//If nothing configured in the config file, this is the default settings for grouping properties into different bucket
|
||||||
private void PopulatePropertyBuketMapByDefault()
|
private void PopulatePropertyBuketMapByDefault()
|
||||||
{
|
{
|
||||||
|
@ -772,19 +778,22 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
case SceneObjectPartProperties.GroupPosition:
|
case SceneObjectPartProperties.GroupPosition:
|
||||||
case SceneObjectPartProperties.OffsetPosition:
|
case SceneObjectPartProperties.OffsetPosition:
|
||||||
case SceneObjectPartProperties.Scale:
|
case SceneObjectPartProperties.Scale:
|
||||||
case SceneObjectPartProperties.Velocity:
|
|
||||||
case SceneObjectPartProperties.AngularVelocity:
|
case SceneObjectPartProperties.AngularVelocity:
|
||||||
case SceneObjectPartProperties.RotationOffset:
|
case SceneObjectPartProperties.RotationOffset:
|
||||||
case SceneObjectPartProperties.Position:
|
|
||||||
case SceneObjectPartProperties.Size:
|
case SceneObjectPartProperties.Size:
|
||||||
|
case SceneObjectPartProperties.Position:
|
||||||
case SceneObjectPartProperties.Force:
|
case SceneObjectPartProperties.Force:
|
||||||
|
case SceneObjectPartProperties.Velocity:
|
||||||
case SceneObjectPartProperties.RotationalVelocity:
|
case SceneObjectPartProperties.RotationalVelocity:
|
||||||
case SceneObjectPartProperties.PA_Acceleration:
|
case SceneObjectPartProperties.PA_Acceleration:
|
||||||
case SceneObjectPartProperties.Torque:
|
case SceneObjectPartProperties.Torque:
|
||||||
case SceneObjectPartProperties.Orientation:
|
case SceneObjectPartProperties.Orientation:
|
||||||
case SceneObjectPartProperties.IsPhysical:
|
case SceneObjectPartProperties.IsPhysical:
|
||||||
case SceneObjectPartProperties.Flying:
|
case SceneObjectPartProperties.Flying:
|
||||||
|
case SceneObjectPartProperties.Kinematic:
|
||||||
case SceneObjectPartProperties.Buoyancy:
|
case SceneObjectPartProperties.Buoyancy:
|
||||||
|
case SceneObjectPartProperties.IsCollidingGround:
|
||||||
|
case SceneObjectPartProperties.IsColliding:
|
||||||
m_primPropertyBucketMap.Add(property, physicsBucketName);
|
m_primPropertyBucketMap.Add(property, physicsBucketName);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue