diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/PhysEngineToSceneConnectorModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/PhysEngineToSceneConnectorModule.cs index 498a810934..fa85318920 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/PhysEngineToSceneConnectorModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/PhysEngineToSceneConnectorModule.cs @@ -250,6 +250,14 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule s = ss; break; } + { + ScenePresence sp = ss.GetScenePresence(pa.LocalID); + if (sp != null) + { + s = ss; + break; + } + } } if (s != null) { diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncClient.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncClient.cs index 5688016892..20131363bf 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncClient.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncClient.cs @@ -282,6 +282,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule case RegionSyncMessage.MsgType.Terrain: { m_scene.Heightmap.LoadFromXmlString(Encoding.ASCII.GetString(msg.Data, 0, msg.Length)); + m_scene.PhysicsScene.SetTerrain(m_scene.Heightmap.GetFloatsSerialised()); RegionSyncMessage.HandleSuccess(LogHeader, msg, "Synchronized terrain"); return; } diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SceneToPhysEngineSyncServer.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SceneToPhysEngineSyncServer.cs index 7e18befae6..8d91c50f7e 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SceneToPhysEngineSyncServer.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SceneToPhysEngineSyncServer.cs @@ -273,7 +273,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule public void SendUpdate(PhysicsActor pa) { // m_log.DebugFormat("{0}: SendUpdate for {1}", LogHeader, pa.LocalID); - this.m_sceneToPhysEngineConnector.SendPhysUpdateAttributes(pa); + if (pa.lastValues.Changed(pa)) + { + this.m_sceneToPhysEngineConnector.SendPhysUpdateAttributes(pa); + } } #endregion diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 5ae9f0b76e..23249dcf55 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -207,8 +207,11 @@ namespace OpenSim.Region.Physics.OdePlugin { if (PhysEngineToSceneConnectorModule.IsPhysEngineActorS) { - m_log.DebugFormat("[ODE CHARACTER]: Sending terse update for {0}", LocalID); - PhysEngineToSceneConnectorModule.RouteUpdate(this); + // m_log.DebugFormat("[ODE CHARACTER]: Sending terse update for {0}", LocalID); + if (this.lastValues.Changed(this)) + { + PhysEngineToSceneConnectorModule.RouteUpdate(this); + } } else { @@ -1194,7 +1197,6 @@ namespace OpenSim.Region.Physics.OdePlugin } if (!m_lastUpdateSent) { - m_log.DebugFormat("[ODE CHARACTER] UpdatePositionAndVelocity"); this.RequestPhysicsterseUpdate(); } } diff --git a/OpenSim/Region/Physics/PEPlugin/PECharacter.cs b/OpenSim/Region/Physics/PEPlugin/PECharacter.cs index 3554e43861..4bdbcce943 100755 --- a/OpenSim/Region/Physics/PEPlugin/PECharacter.cs +++ b/OpenSim/Region/Physics/PEPlugin/PECharacter.cs @@ -88,19 +88,16 @@ public class PECharacter : PhysicsActor public override Vector3 Size { get { return _size; } set { _size = value; - m_log.Debug("[RPE] PEChar set Size"); Prop.Set(_localID, PropType.Size, _size); } } public override PrimitiveBaseShape Shape { set { _pbs = value; - m_log.Debug("[RPE] PEChar set Shape"); Prop.Set(_localID, PropType.Shape, _pbs); } } public override uint LocalID { set { _localID = value; - m_log.Debug("[RPE] PEChar set LocalID"); Prop.Set(_localID, PropType.LocalID, _localID); } get { return _localID; } @@ -125,7 +122,6 @@ public class PECharacter : PhysicsActor public override Vector3 Position { get { return _position; } set { _position = value; - // m_log.DebugFormat("[RPE] PEChar set Position: {0}", _position); Prop.Set(_localID, PropType.Position, _position); } } @@ -135,7 +131,6 @@ public class PECharacter : PhysicsActor public override Vector3 Force { get { return _force; } set { _force = value; - m_log.Debug("[RPE] PEChar set Force"); Prop.Set(_localID, PropType.Force, _force); } } @@ -157,7 +152,6 @@ public class PECharacter : PhysicsActor public override Vector3 Velocity { get { return _velocity; } set { _velocity = value; - m_log.Debug("[RPE] PEChar set Velocity"); Prop.Set(_localID, PropType.Velocity, _velocity); } } diff --git a/OpenSim/Region/Physics/PEPlugin/PEPrim.cs b/OpenSim/Region/Physics/PEPlugin/PEPrim.cs index 8eb23d6667..0a3baa03b0 100755 --- a/OpenSim/Region/Physics/PEPlugin/PEPrim.cs +++ b/OpenSim/Region/Physics/PEPlugin/PEPrim.cs @@ -90,7 +90,7 @@ public sealed class PEPrim : PhysicsActor public override Vector3 Size { get { return _size; } set { _size = value; - m_log.Debug("[RPE] PEPrim set Size"); + // m_log.Debug("[RPE] PEPrim set Size"); Prop.Set(_localID, PropType.Size, _size); } }