From 11db34313dde4d3b8b3860982abd10446b6203f2 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 25 Feb 2011 16:54:04 -0800 Subject: [PATCH] Restore old PhysicsActor sync code. Not tested yet --- .../RegionSyncModule/RegionSyncAvatar.cs | 4 --- OpenSim/Region/Framework/Scenes/Scene.cs | 27 +++++++++++++++++-- .../Region/Physics/Manager/PhysicsActor.cs | 2 ++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncAvatar.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncAvatar.cs index 8586877b5a..22fd58e9f1 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncAvatar.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncAvatar.cs @@ -601,11 +601,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) { -<<<<<<< HEAD // m_log.Debug("[REGION SYNC AVATAR] SendPrimUpdate"); -======= - //m_log.Debug("[REGION SYNC AVATAR] SendPrimUpdate"); ->>>>>>> 513ca97eb038efea3dd7685a314b3f64e8770784 } public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d26bbed026..76ecde7efa 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -496,6 +496,28 @@ namespace OpenSim.Region.Framework.Scenes /////////////////////////////////////////////////////////////////////////////////////////////// //RA: Physics Engine /////////////////////////////////////////////////////////////////////////////////////////////// + protected IPhysEngineToSceneConnectorModule m_physEngineToSceneConnectorModule = null; + public IPhysEngineToSceneConnectorModule PhysEngineToSceneConnectorModule + { + get { return m_physEngineToSceneConnectorModule; } + set { m_physEngineToSceneConnectorModule = value; } + } + + protected ISceneToPhysEngineServer m_sceneToPhysEngineSyncServer = null; + public ISceneToPhysEngineServer SceneToPhysEngineSyncServer + { + get + { + if (m_sceneToPhysEngineSyncServer == null) + { + // kludge since this module is loaded in postInitialize + m_sceneToPhysEngineSyncServer = RequestModuleInterface(); + } + return m_sceneToPhysEngineSyncServer; + } + set { m_sceneToPhysEngineSyncServer = value; } + } + protected bool IsPhysEngineActor() { // turns out every actor needs the physics engine. @@ -1483,8 +1505,9 @@ namespace OpenSim.Region.Framework.Scenes //REGION SYNC RegionSyncServerModule = RequestModuleInterface(); RegionSyncClientModule = RequestModuleInterface(); - ScriptEngineToSceneConnectorModule = RequestModuleInterface(); - + ScriptEngineToSceneConnectorModule = RequestModuleInterface(); + PhysEngineToSceneConnectorModule = RequestModuleInterface(); + SceneToPhysEngineSyncServer = RequestModuleInterface(); ////////////////////////////////////////////////////////////////////// //SYMMETRIC SYNC (KittyL: started 12/23/2010) ////////////////////////////////////////////////////////////////////// diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index f6dcc9885e..7f30f7ced2 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -199,6 +199,8 @@ namespace OpenSim.Region.Physics.Manager get { return m_UUID; } } public PhysActorLastValues lastValues; + // ID of actor which last updated the values. Send if I did the change. + public string ChangingActorID = "YY"; // set to true of prim is updated public bool SyncUpdated;