From e420f815dc9be9c7fc93cb94c86517d97abbed86 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 29 Jun 2012 00:54:40 +0100
Subject: refactor: rename _collisionEventPrim to m_collisionEventActors and
_collisionEventPrimChanges to m_collisionEventActorsChanges to reflect their
actual contents.
These dictionaries handle all actor types, not just physical prims.
---
OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region/Physics/OdePlugin/OdeScene.cs')
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index c6ecc68..79de99e 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -387,12 +387,12 @@ namespace OpenSim.Region.Physics.OdePlugin
///
/// A dictionary of actors that should receive collision events.
///
- private readonly Dictionary _collisionEventPrim = new Dictionary();
+ private readonly Dictionary m_collisionEventActors = new Dictionary();
///
/// A dictionary of collision event changes that are waiting to be processed.
///
- private readonly Dictionary _collisionEventPrimChanges = new Dictionary();
+ private readonly Dictionary m_collisionEventActorsChanges = new Dictionary();
///
/// Maps a unique geometry id (a memory location) to a physics actor name.
@@ -1908,8 +1908,8 @@ namespace OpenSim.Region.Physics.OdePlugin
{
// m_log.DebugFormat("[PHYSICS]: Adding {0} {1} to collision event reporting", obj.SOPName, obj.LocalID);
- lock (_collisionEventPrimChanges)
- _collisionEventPrimChanges[obj.LocalID] = obj;
+ lock (m_collisionEventActorsChanges)
+ m_collisionEventActorsChanges[obj.LocalID] = obj;
}
///
@@ -1920,8 +1920,8 @@ namespace OpenSim.Region.Physics.OdePlugin
{
// m_log.DebugFormat("[PHYSICS]: Removing {0} {1} from collision event reporting", obj.SOPName, obj.LocalID);
- lock (_collisionEventPrimChanges)
- _collisionEventPrimChanges[obj.LocalID] = null;
+ lock (m_collisionEventActorsChanges)
+ m_collisionEventActorsChanges[obj.LocalID] = null;
}
#region Add/Remove Entities
@@ -2930,17 +2930,17 @@ namespace OpenSim.Region.Physics.OdePlugin
// We change _collisionEventPrimChanges to avoid locking _collisionEventPrim itself and causing potential
// deadlock if the collision event tries to lock something else later on which is already locked by a
// caller that is adding or removing the collision event.
- lock (_collisionEventPrimChanges)
+ lock (m_collisionEventActorsChanges)
{
- foreach (KeyValuePair kvp in _collisionEventPrimChanges)
+ foreach (KeyValuePair kvp in m_collisionEventActorsChanges)
{
if (kvp.Value == null)
- _collisionEventPrim.Remove(kvp.Key);
+ m_collisionEventActors.Remove(kvp.Key);
else
- _collisionEventPrim[kvp.Key] = kvp.Value;
+ m_collisionEventActors[kvp.Key] = kvp.Value;
}
- _collisionEventPrimChanges.Clear();
+ m_collisionEventActorsChanges.Clear();
}
if (SupportsNINJAJoints)
@@ -3092,7 +3092,7 @@ namespace OpenSim.Region.Physics.OdePlugin
tempTick = tempTick2;
}
- foreach (PhysicsActor obj in _collisionEventPrim.Values)
+ foreach (PhysicsActor obj in m_collisionEventActors.Values)
{
// m_log.DebugFormat("[PHYSICS]: Assessing {0} {1} for collision events", obj.SOPName, obj.LocalID);
--
cgit v1.1
From 0229e90dcc579cee8fe3321a78f6d75b5d70486e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 29 Jun 2012 01:02:35 +0100
Subject: Move update of the final optional ODE total frame stat inside the
OdeLock rather than outside to avoid a very occasional race condition with
the stat collection thread
---
OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Physics/OdePlugin/OdeScene.cs')
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 79de99e..32e81e2 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -3227,10 +3227,10 @@ namespace OpenSim.Region.Physics.OdePlugin
}
tickCountFrameRun = Util.EnvironmentTickCount();
- }
- if (CollectStats)
- m_stats[ODETotalFrameMsStatName] += Util.EnvironmentTickCountSubtract(startFrameTick);
+ if (CollectStats)
+ m_stats[ODETotalFrameMsStatName] += Util.EnvironmentTickCountSubtract(startFrameTick);
+ }
return fps;
}
--
cgit v1.1