Make PECharacter sync PhysActor info back to physics actor. Remove some chatty debug messages. Add checks to warn if PhysicsActor synchronization is acting on a prim rather than a character.
parent
400c9b5293
commit
6b9d58b99b
|
@ -379,10 +379,14 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
{
|
{
|
||||||
UUID uuid = data["uuid"].AsUUID();
|
UUID uuid = data["uuid"].AsUUID();
|
||||||
string actorID = data["actorID"].AsString();
|
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);
|
PhysicsActor pa = FindPhysicsActor(uuid);
|
||||||
if (pa != null)
|
if (pa != null)
|
||||||
{
|
{
|
||||||
|
if (pa.PhysicsActorType == (int)ActorTypes.Prim)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("{0}: HandlePhysUpdateAttributes for an prim: {1}", LogHeader, pa.UUID);
|
||||||
|
}
|
||||||
// pa.Size = data["size"].AsVector3();
|
// pa.Size = data["size"].AsVector3();
|
||||||
pa.Position = data["position"].AsVector3();
|
pa.Position = data["position"].AsVector3();
|
||||||
pa.Force = data["force"].AsVector3();
|
pa.Force = data["force"].AsVector3();
|
||||||
|
@ -436,6 +440,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
public void SendPhysUpdateAttributes(PhysicsActor pa)
|
public void SendPhysUpdateAttributes(PhysicsActor pa)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("{0}: SendPhysUpdateAttributes for {1}", LogHeader, pa.UUID);
|
// m_log.DebugFormat("{0}: SendPhysUpdateAttributes for {1}", LogHeader, pa.UUID);
|
||||||
|
if (pa.PhysicsActorType == (int)ActorTypes.Prim)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("{0}: SendPhysUpdateAttributes for an prim: {1}", LogHeader, pa.UUID);
|
||||||
|
}
|
||||||
OSDMap data = new OSDMap(17);
|
OSDMap data = new OSDMap(17);
|
||||||
data["time"] = OSD.FromString(DateTime.Now.ToString("yyyyMMddHHmmssfff"));
|
data["time"] = OSD.FromString(DateTime.Now.ToString("yyyyMMddHHmmssfff"));
|
||||||
data["localID"] = OSD.FromUInteger(pa.LocalID);
|
data["localID"] = OSD.FromUInteger(pa.LocalID);
|
||||||
|
|
|
@ -346,6 +346,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
PhysicsActor pa = FindPhysicsActor(uuid);
|
PhysicsActor pa = FindPhysicsActor(uuid);
|
||||||
if (pa != null)
|
if (pa != null)
|
||||||
{
|
{
|
||||||
|
if (pa.PhysicsActorType == (int)ActorTypes.Prim)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("{0}: HandlePhysUpdateAttributes for an prim: {1}", LogHeader, pa.UUID);
|
||||||
|
}
|
||||||
pa.Size = data["size"].AsVector3();
|
pa.Size = data["size"].AsVector3();
|
||||||
pa.Position = data["position"].AsVector3();
|
pa.Position = data["position"].AsVector3();
|
||||||
pa.Force = data["force"].AsVector3();
|
pa.Force = data["force"].AsVector3();
|
||||||
|
@ -397,6 +401,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
public void SendPhysUpdateAttributes(PhysicsActor pa)
|
public void SendPhysUpdateAttributes(PhysicsActor pa)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("{0}: sending PhysUpdateAttributes for {1}", LogHeader, pa.UUID);
|
// m_log.DebugFormat("{0}: sending PhysUpdateAttributes for {1}", LogHeader, pa.UUID);
|
||||||
|
if (pa.PhysicsActorType == (int)ActorTypes.Prim)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("{0}: SendPhysUpdateAttributes for an prim: {1}", LogHeader, pa.UUID);
|
||||||
|
}
|
||||||
OSDMap data = new OSDMap(15);
|
OSDMap data = new OSDMap(15);
|
||||||
data["time"] = OSD.FromString(DateTime.Now.ToString("yyyyMMddHHmmssfff"));
|
data["time"] = OSD.FromString(DateTime.Now.ToString("yyyyMMddHHmmssfff"));
|
||||||
data["localID"] = OSD.FromUInteger(pa.LocalID);
|
data["localID"] = OSD.FromUInteger(pa.LocalID);
|
||||||
|
|
|
@ -1643,7 +1643,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
|
// m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3);
|
// "[SCENE PRESENCE] In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3);
|
||||||
|
|
||||||
AddNewMovement(agent_control_v3, q);
|
AddNewMovement(agent_control_v3, q);
|
||||||
|
|
||||||
|
@ -2443,7 +2443,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendTerseUpdateToAllClients()
|
public void SendTerseUpdateToAllClients()
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[SCENE PRESENCE]: TerseUpdate: UUID={0}, pos={1}", m_physicsActor.UUID.ToString(), m_physicsActor.Position.ToString());
|
// m_log.DebugFormat("[SCENE PRESENCE]: TerseUpdate: UUID={0}, pos={1}", m_physicsActor.UUID.ToString(), m_physicsActor.Position.ToString());
|
||||||
// REGION SYNC
|
// REGION SYNC
|
||||||
if (m_scene.IsSyncedServer())
|
if (m_scene.IsSyncedServer())
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,7 @@ using log4net;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.Physics.Manager;
|
||||||
|
using OpenSim.Region.CoreModules.RegionSync.RegionSyncModule;
|
||||||
|
|
||||||
namespace OpenSim.Region.Physics.PEPlugin
|
namespace OpenSim.Region.Physics.PEPlugin
|
||||||
{
|
{
|
||||||
|
@ -86,6 +87,24 @@ public class PECharacter : PhysicsActor
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void RequestPhysicsterseUpdate()
|
||||||
|
{
|
||||||
|
if (PhysEngineToSceneConnectorModule.IsPhysEngineActorS)
|
||||||
|
{
|
||||||
|
// if the values have changed and it was I who changed them, send an update
|
||||||
|
if (this.lastValues.Changed(this) && ChangingActorID == RegionSyncServerModule.ActorID)
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat("[ODE CHARACTER]: Sending terse update for {0}", LocalID);
|
||||||
|
PhysEngineToSceneConnectorModule.RouteUpdate(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.RequestPhysicsterseUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public override bool Stopped {
|
public override bool Stopped {
|
||||||
get { return _stopped; }
|
get { return _stopped; }
|
||||||
}
|
}
|
||||||
|
@ -105,12 +124,12 @@ public class PECharacter : PhysicsActor
|
||||||
}
|
}
|
||||||
public override bool Grabbed {
|
public override bool Grabbed {
|
||||||
set { _grabbed = value;
|
set { _grabbed = value;
|
||||||
m_log.Debug("[RPE] PEChar set Grabbed");
|
// m_log.Debug("[RPE] PEChar set Grabbed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override bool Selected {
|
public override bool Selected {
|
||||||
set { _selected = value;
|
set { _selected = value;
|
||||||
m_log.Debug("[RPE] PEChar set Selected");
|
// m_log.Debug("[RPE] PEChar set Selected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override void CrossingFailure() { return; }
|
public override void CrossingFailure() { return; }
|
||||||
|
@ -121,6 +140,7 @@ public class PECharacter : PhysicsActor
|
||||||
public override Vector3 Position {
|
public override Vector3 Position {
|
||||||
get { return _position; }
|
get { return _position; }
|
||||||
set { _position = value;
|
set { _position = value;
|
||||||
|
base.ChangingActorID = RegionSyncServerModule.ActorID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override float Mass {
|
public override float Mass {
|
||||||
|
@ -133,6 +153,7 @@ public class PECharacter : PhysicsActor
|
||||||
public override Vector3 Force {
|
public override Vector3 Force {
|
||||||
get { return _force; }
|
get { return _force; }
|
||||||
set { _force = value;
|
set { _force = value;
|
||||||
|
base.ChangingActorID = RegionSyncServerModule.ActorID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,6 +174,7 @@ public class PECharacter : PhysicsActor
|
||||||
public override Vector3 Velocity {
|
public override Vector3 Velocity {
|
||||||
get { return _velocity; }
|
get { return _velocity; }
|
||||||
set { _velocity = value;
|
set { _velocity = value;
|
||||||
|
base.ChangingActorID = RegionSyncServerModule.ActorID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override Vector3 Torque {
|
public override Vector3 Torque {
|
||||||
|
@ -171,6 +193,7 @@ public class PECharacter : PhysicsActor
|
||||||
public override Quaternion Orientation {
|
public override Quaternion Orientation {
|
||||||
get { return _orientation; }
|
get { return _orientation; }
|
||||||
set { _orientation = value;
|
set { _orientation = value;
|
||||||
|
base.ChangingActorID = RegionSyncServerModule.ActorID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override int PhysicsActorType {
|
public override int PhysicsActorType {
|
||||||
|
|
|
@ -96,7 +96,7 @@ public sealed class PEPrim : PhysicsActor
|
||||||
}
|
}
|
||||||
public override PrimitiveBaseShape Shape {
|
public override PrimitiveBaseShape Shape {
|
||||||
set { _pbs = value;
|
set { _pbs = value;
|
||||||
m_log.Debug("[REMOTE PRIM ENGINE] PEPrim set Shape");
|
// m_log.Debug("[REMOTE PRIM ENGINE] PEPrim set Shape");
|
||||||
// SyncUpdated = true;
|
// SyncUpdated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,12 +109,12 @@ public sealed class PEPrim : PhysicsActor
|
||||||
}
|
}
|
||||||
public override bool Grabbed {
|
public override bool Grabbed {
|
||||||
set { _grabbed = value;
|
set { _grabbed = value;
|
||||||
m_log.Debug("[REMOTE PRIM ENGINE] PEPrim set Grabbed");
|
// m_log.Debug("[REMOTE PRIM ENGINE] PEPrim set Grabbed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override bool Selected {
|
public override bool Selected {
|
||||||
set { _selected = value;
|
set { _selected = value;
|
||||||
m_log.Debug("[REMOTE PRIM ENGINE] PEPrim set Selected");
|
// m_log.Debug("[REMOTE PRIM ENGINE] PEPrim set Selected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override void CrossingFailure() { return; }
|
public override void CrossingFailure() { return; }
|
||||||
|
|
Loading…
Reference in New Issue