Get rid of OdeCharacter != null checks since OdeScene._characters can never contain a null character.
Ignoring the ancient code glyphs not to do this....iar_mods
parent
82dc7886fc
commit
4ddff7eb0f
OpenSim/Region/Physics/OdePlugin
|
@ -1538,12 +1538,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
// Reset the collision values to false
|
// Reset the collision values to false
|
||||||
// since we don't know if we're colliding yet
|
// since we don't know if we're colliding yet
|
||||||
|
|
||||||
// For some reason this can happen. Don't ask...
|
|
||||||
//
|
|
||||||
if (chr == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (chr.Shell == IntPtr.Zero || chr.Body == IntPtr.Zero)
|
if (chr.Shell == IntPtr.Zero || chr.Body == IntPtr.Zero)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -2056,7 +2050,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
//m_log.Debug("RemoveAllJointsConnectedToActor: start");
|
//m_log.Debug("RemoveAllJointsConnectedToActor: start");
|
||||||
if (actor.SOPName != null && joints_connecting_actor.ContainsKey(actor.SOPName) && joints_connecting_actor[actor.SOPName] != null)
|
if (actor.SOPName != null && joints_connecting_actor.ContainsKey(actor.SOPName) && joints_connecting_actor[actor.SOPName] != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<PhysicsJoint> jointsToRemove = new List<PhysicsJoint>();
|
List<PhysicsJoint> jointsToRemove = new List<PhysicsJoint>();
|
||||||
//TODO: merge these 2 loops (originally it was needed to avoid altering a list being iterated over, but it is no longer needed due to the joint request queue mechanism)
|
//TODO: merge these 2 loops (originally it was needed to avoid altering a list being iterated over, but it is no longer needed due to the joint request queue mechanism)
|
||||||
foreach (PhysicsJoint j in joints_connecting_actor[actor.SOPName])
|
foreach (PhysicsJoint j in joints_connecting_actor[actor.SOPName])
|
||||||
|
@ -2801,10 +2794,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
|
||||||
|
|
||||||
// Move characters
|
// Move characters
|
||||||
foreach (OdeCharacter actor in _characters)
|
foreach (OdeCharacter actor in _characters)
|
||||||
{
|
|
||||||
if (actor != null)
|
|
||||||
actor.Move(defects);
|
actor.Move(defects);
|
||||||
}
|
|
||||||
|
|
||||||
if (defects.Count != 0)
|
if (defects.Count != 0)
|
||||||
{
|
{
|
||||||
|
@ -2869,15 +2859,12 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (OdeCharacter actor in _characters)
|
foreach (OdeCharacter actor in _characters)
|
||||||
{
|
|
||||||
if (actor != null)
|
|
||||||
{
|
{
|
||||||
if (actor.bad)
|
if (actor.bad)
|
||||||
m_log.WarnFormat("[PHYSICS]: BAD Actor {0} in _characters list was not removed?", actor.m_uuid);
|
m_log.WarnFormat("[PHYSICS]: BAD Actor {0} in _characters list was not removed?", actor.m_uuid);
|
||||||
|
|
||||||
actor.UpdatePositionAndVelocity(defects);
|
actor.UpdatePositionAndVelocity(defects);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (defects.Count != 0)
|
if (defects.Count != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue