remove debug statements. Pass terrain to physics engine

dsg
Robert Adams 2010-12-15 15:05:40 -08:00
parent 7c6bca1668
commit 420aeb9b6a
6 changed files with 19 additions and 11 deletions

View File

@ -250,6 +250,14 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
s = ss; s = ss;
break; break;
} }
{
ScenePresence sp = ss.GetScenePresence(pa.LocalID);
if (sp != null)
{
s = ss;
break;
}
}
} }
if (s != null) if (s != null)
{ {

View File

@ -282,6 +282,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
case RegionSyncMessage.MsgType.Terrain: case RegionSyncMessage.MsgType.Terrain:
{ {
m_scene.Heightmap.LoadFromXmlString(Encoding.ASCII.GetString(msg.Data, 0, msg.Length)); 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"); RegionSyncMessage.HandleSuccess(LogHeader, msg, "Synchronized terrain");
return; return;
} }

View File

@ -273,7 +273,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
public void SendUpdate(PhysicsActor pa) public void SendUpdate(PhysicsActor pa)
{ {
// m_log.DebugFormat("{0}: SendUpdate for {1}", LogHeader, pa.LocalID); // 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 #endregion

View File

@ -207,8 +207,11 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
if (PhysEngineToSceneConnectorModule.IsPhysEngineActorS) if (PhysEngineToSceneConnectorModule.IsPhysEngineActorS)
{ {
m_log.DebugFormat("[ODE CHARACTER]: Sending terse update for {0}", LocalID); // m_log.DebugFormat("[ODE CHARACTER]: Sending terse update for {0}", LocalID);
PhysEngineToSceneConnectorModule.RouteUpdate(this); if (this.lastValues.Changed(this))
{
PhysEngineToSceneConnectorModule.RouteUpdate(this);
}
} }
else else
{ {
@ -1194,7 +1197,6 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
if (!m_lastUpdateSent) if (!m_lastUpdateSent)
{ {
m_log.DebugFormat("[ODE CHARACTER] UpdatePositionAndVelocity");
this.RequestPhysicsterseUpdate(); this.RequestPhysicsterseUpdate();
} }
} }

View File

@ -88,19 +88,16 @@ public class PECharacter : PhysicsActor
public override Vector3 Size { public override Vector3 Size {
get { return _size; } get { return _size; }
set { _size = value; set { _size = value;
m_log.Debug("[RPE] PEChar set Size");
Prop.Set(_localID, PropType.Size, _size); Prop.Set(_localID, PropType.Size, _size);
} }
} }
public override PrimitiveBaseShape Shape { public override PrimitiveBaseShape Shape {
set { _pbs = value; set { _pbs = value;
m_log.Debug("[RPE] PEChar set Shape");
Prop.Set(_localID, PropType.Shape, _pbs); Prop.Set(_localID, PropType.Shape, _pbs);
} }
} }
public override uint LocalID { public override uint LocalID {
set { _localID = value; set { _localID = value;
m_log.Debug("[RPE] PEChar set LocalID");
Prop.Set(_localID, PropType.LocalID, _localID); Prop.Set(_localID, PropType.LocalID, _localID);
} }
get { return _localID; } get { return _localID; }
@ -125,7 +122,6 @@ public class PECharacter : PhysicsActor
public override Vector3 Position { public override Vector3 Position {
get { return _position; } get { return _position; }
set { _position = value; set { _position = value;
// m_log.DebugFormat("[RPE] PEChar set Position: {0}", _position);
Prop.Set(_localID, PropType.Position, _position); Prop.Set(_localID, PropType.Position, _position);
} }
} }
@ -135,7 +131,6 @@ public class PECharacter : PhysicsActor
public override Vector3 Force { public override Vector3 Force {
get { return _force; } get { return _force; }
set { _force = value; set { _force = value;
m_log.Debug("[RPE] PEChar set Force");
Prop.Set(_localID, PropType.Force, _force); Prop.Set(_localID, PropType.Force, _force);
} }
} }
@ -157,7 +152,6 @@ public class PECharacter : PhysicsActor
public override Vector3 Velocity { public override Vector3 Velocity {
get { return _velocity; } get { return _velocity; }
set { _velocity = value; set { _velocity = value;
m_log.Debug("[RPE] PEChar set Velocity");
Prop.Set(_localID, PropType.Velocity, _velocity); Prop.Set(_localID, PropType.Velocity, _velocity);
} }
} }

View File

@ -90,7 +90,7 @@ public sealed class PEPrim : PhysicsActor
public override Vector3 Size { public override Vector3 Size {
get { return _size; } get { return _size; }
set { _size = value; set { _size = value;
m_log.Debug("[RPE] PEPrim set Size"); // m_log.Debug("[RPE] PEPrim set Size");
Prop.Set(_localID, PropType.Size, _size); Prop.Set(_localID, PropType.Size, _size);
} }
} }