diff options
author | Teravus Ovares (Dan Olivares) | 2009-10-16 14:30:55 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-10-16 14:30:55 -0400 |
commit | 0079d0a7c423db6e95c04b9055127b53ae6a3622 (patch) | |
tree | 2d218e548720be8aa5c114ebc618f7cf09e8bb6a /OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |
parent | Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-0079d0a7c423db6e95c04b9055127b53ae6a3622.zip opensim-SC-0079d0a7c423db6e95c04b9055127b53ae6a3622.tar.gz opensim-SC-0079d0a7c423db6e95c04b9055127b53ae6a3622.tar.bz2 opensim-SC-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/OdePlugin.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 21 |
1 files changed, 21 insertions, 0 deletions
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) |