diff options
author | John Hurliman | 2009-10-16 12:42:53 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-16 12:42:53 -0700 |
commit | eee1318597eeff27ab0df4fa0596aea2acad568f (patch) | |
tree | f861868740cdbdbc6db9650677ff75557e137f35 /OpenSim/Region | |
parent | * Change appearance packets from State to Task. This will hopefully fix the c... (diff) | |
parent | * One more attempt at the NullRef In The OdePlugin. This might fix it, but ... (diff) | |
download | opensim-SC-eee1318597eeff27ab0df4fa0596aea2acad568f.zip opensim-SC-eee1318597eeff27ab0df4fa0596aea2acad568f.tar.gz opensim-SC-eee1318597eeff27ab0df4fa0596aea2acad568f.tar.bz2 opensim-SC-eee1318597eeff27ab0df4fa0596aea2acad568f.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 21 |
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) |