Fix physical actor update by passing additional attributes when physics terse update happens

dsg
Robert Adams 2011-05-18 08:30:59 -07:00
parent a0a8654c07
commit 83d67391f1
3 changed files with 10 additions and 5 deletions

View File

@ -342,7 +342,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
{
UUID uuid = data["uuid"].AsUUID();
string actorID = data["actorID"].AsString();
m_log.DebugFormat("{0}: HandlPhysUpdateAttributes for {1}", LogHeader, uuid);
// m_log.DebugFormat("{0}: HandlPhysUpdateAttributes for {1}", LogHeader, uuid);
PhysicsActor pa = FindPhysicsActor(uuid);
if (pa != null)
{

View File

@ -373,7 +373,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
pa.Kinematic = data["kinematic"].AsBoolean(); // receive??
pa.Buoyancy = (float)(data["buoyancy"].AsReal());
pa.CollidingGround = data["isCollidingGround"].AsBoolean();
pa.IsColliding = data["isCollidingGround"].AsBoolean();
pa.IsColliding = data["isColliding"].AsBoolean();
pa.ChangingActorID = actorID;
pa.RequestPhysicsterseUpdate(); // tell the system the values have changed
@ -431,8 +431,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
data["isPhysical"] = OSD.FromBoolean(pa.IsPhysical);
data["flying"] = OSD.FromBoolean(pa.Flying);
data["buoyancy"] = OSD.FromReal(pa.Buoyancy);
// data["isColliding"] = OSD.FromBoolean(pa.IsColliding);
// data["isCollidingGround"] = OSD.FromBoolean(pa.CollidingGround);
data["isColliding"] = OSD.FromBoolean(pa.IsColliding);
data["isCollidingGround"] = OSD.FromBoolean(pa.CollidingGround);
RegionSyncMessage rsm = new RegionSyncMessage(RegionSyncMessage.MsgType.PhysUpdateAttributes,
OSDParser.SerializeJsonString(data));

View File

@ -2794,7 +2794,12 @@ namespace OpenSim.Region.Framework.Scenes
//m_parentGroup.RootPart.m_groupPosition = newpos;
}
//ScheduleTerseUpdate();
ScheduleTerseUpdate(new List<SceneObjectPartSyncProperties>(){SceneObjectPartSyncProperties.Position});
ScheduleTerseUpdate(new List<SceneObjectPartSyncProperties>(){
SceneObjectPartSyncProperties.Position,
SceneObjectPartSyncProperties.Orientation,
SceneObjectPartSyncProperties.Velocity,
SceneObjectPartSyncProperties.RotationalVelocity
});
//SendTerseUpdateToAllClients();
}