aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-10-16 14:30:55 -0400
committerTeravus Ovares (Dan Olivares)2009-10-16 14:30:55 -0400
commit0079d0a7c423db6e95c04b9055127b53ae6a3622 (patch)
tree2d218e548720be8aa5c114ebc618f7cf09e8bb6a /OpenSim/Region/Physics/OdePlugin
parentMerge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-0079d0a7c423db6e95c04b9055127b53ae6a3622.zip
opensim-SC_OLD-0079d0a7c423db6e95c04b9055127b53ae6a3622.tar.gz
opensim-SC_OLD-0079d0a7c423db6e95c04b9055127b53ae6a3622.tar.bz2
opensim-SC_OLD-0079d0a7c423db6e95c04b9055127b53ae6a3622.tar.xz
* One more attempt at the NullRef In The OdePlugin. This might fix it, but it will definitely get us closer to the root cause.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs21
2 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index e5458d4..1fff846 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -1109,10 +1109,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1109 try 1109 try
1110 { 1110 {
1111 vec = d.BodyGetPosition(Body); 1111 vec = d.BodyGetPosition(Body);
1112
1113 } 1112 }
1114 catch (NullReferenceException) 1113 catch (NullReferenceException)
1115 { 1114 {
1115 _parent_scene.BadCharacter(this);
1116 vec = new d.Vector3(_position.X, _position.Y, _position.Z); 1116 vec = new d.Vector3(_position.X, _position.Y, _position.Z);
1117 base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem! 1117 base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem!
1118 m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar: {0}", m_name); 1118 m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar: {0}", m_name);
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 083b7db..0e03e81 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -242,6 +242,7 @@ namespace OpenSim.Region.Physics.OdePlugin
242 private readonly HashSet<OdeCharacter> _taintedActors = new HashSet<OdeCharacter>(); 242 private readonly HashSet<OdeCharacter> _taintedActors = new HashSet<OdeCharacter>();
243 private readonly List<d.ContactGeom> _perloopContact = new List<d.ContactGeom>(); 243 private readonly List<d.ContactGeom> _perloopContact = new List<d.ContactGeom>();
244 private readonly List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>(); 244 private readonly List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>();
245 private readonly HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>();
245 public Dictionary<IntPtr, String> geom_name_map = new Dictionary<IntPtr, String>(); 246 public Dictionary<IntPtr, String> geom_name_map = new Dictionary<IntPtr, String>();
246 public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>(); 247 public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>();
247 private bool m_NINJA_physics_joints_enabled = false; 248 private bool m_NINJA_physics_joints_enabled = false;
@@ -1677,6 +1678,14 @@ namespace OpenSim.Region.Physics.OdePlugin
1677 } 1678 }
1678 } 1679 }
1679 } 1680 }
1681 public void BadCharacter(OdeCharacter chr)
1682 {
1683 lock (_badCharacter)
1684 {
1685 if (!_badCharacter.Contains(chr))
1686 _badCharacter.Add(chr);
1687 }
1688 }
1680 1689
1681 public override void RemoveAvatar(PhysicsActor actor) 1690 public override void RemoveAvatar(PhysicsActor actor)
1682 { 1691 {
@@ -2975,6 +2984,18 @@ namespace OpenSim.Region.Physics.OdePlugin
2975 } 2984 }
2976 } 2985 }
2977 2986
2987 lock (_badCharacter)
2988 {
2989 if (_badCharacter.Count > 0)
2990 {
2991 foreach (OdeCharacter chr in _badCharacter)
2992 {
2993 RemoveCharacter(chr);
2994 }
2995 _badCharacter.Clear();
2996 }
2997 }
2998
2978 lock (_activeprims) 2999 lock (_activeprims)
2979 { 3000 {
2980 //if (timeStep < 0.2f) 3001 //if (timeStep < 0.2f)