diff options
author | Melanie | 2012-06-29 22:24:53 +0100 |
---|---|---|
committer | Melanie | 2012-06-29 22:24:53 +0100 |
commit | 6137f37028a798f87af3f8afb71ec4856b2a5ad8 (patch) | |
tree | 39289035f883415b5ccae36a9b2af1ad60c7acf6 /OpenSim/Region/Physics/OdePlugin | |
parent | Merge branch 'avination' into careminster (diff) | |
parent | Move update of the final optional ODE total frame stat inside the OdeLock rat... (diff) | |
download | opensim-SC-6137f37028a798f87af3f8afb71ec4856b2a5ad8.zip opensim-SC-6137f37028a798f87af3f8afb71ec4856b2a5ad8.tar.gz opensim-SC-6137f37028a798f87af3f8afb71ec4856b2a5ad8.tar.bz2 opensim-SC-6137f37028a798f87af3f8afb71ec4856b2a5ad8.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 30 |
2 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 54b69a2..f3b0630 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -1270,7 +1270,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1270 | 1270 | ||
1271 | public override void UnSubscribeEvents() | 1271 | public override void UnSubscribeEvents() |
1272 | { | 1272 | { |
1273 | CollisionEventsThisFrame.Clear(); | 1273 | _parent_scene.RemoveCollisionEventReporting(this); |
1274 | 1274 | ||
1275 | // Don't clear collision event reporting here. This is called directly from scene code and so can lead | 1275 | // Don't clear collision event reporting here. This is called directly from scene code and so can lead |
1276 | // to a race condition with the simulate loop | 1276 | // to a race condition with the simulate loop |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index c6ecc68..32e81e2 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -387,12 +387,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
387 | /// <summary> | 387 | /// <summary> |
388 | /// A dictionary of actors that should receive collision events. | 388 | /// A dictionary of actors that should receive collision events. |
389 | /// </summary> | 389 | /// </summary> |
390 | private readonly Dictionary<uint, PhysicsActor> _collisionEventPrim = new Dictionary<uint, PhysicsActor>(); | 390 | private readonly Dictionary<uint, PhysicsActor> m_collisionEventActors = new Dictionary<uint, PhysicsActor>(); |
391 | 391 | ||
392 | /// <summary> | 392 | /// <summary> |
393 | /// A dictionary of collision event changes that are waiting to be processed. | 393 | /// A dictionary of collision event changes that are waiting to be processed. |
394 | /// </summary> | 394 | /// </summary> |
395 | private readonly Dictionary<uint, PhysicsActor> _collisionEventPrimChanges = new Dictionary<uint, PhysicsActor>(); | 395 | private readonly Dictionary<uint, PhysicsActor> m_collisionEventActorsChanges = new Dictionary<uint, PhysicsActor>(); |
396 | 396 | ||
397 | /// <summary> | 397 | /// <summary> |
398 | /// Maps a unique geometry id (a memory location) to a physics actor name. | 398 | /// Maps a unique geometry id (a memory location) to a physics actor name. |
@@ -1908,8 +1908,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1908 | { | 1908 | { |
1909 | // m_log.DebugFormat("[PHYSICS]: Adding {0} {1} to collision event reporting", obj.SOPName, obj.LocalID); | 1909 | // m_log.DebugFormat("[PHYSICS]: Adding {0} {1} to collision event reporting", obj.SOPName, obj.LocalID); |
1910 | 1910 | ||
1911 | lock (_collisionEventPrimChanges) | 1911 | lock (m_collisionEventActorsChanges) |
1912 | _collisionEventPrimChanges[obj.LocalID] = obj; | 1912 | m_collisionEventActorsChanges[obj.LocalID] = obj; |
1913 | } | 1913 | } |
1914 | 1914 | ||
1915 | /// <summary> | 1915 | /// <summary> |
@@ -1920,8 +1920,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1920 | { | 1920 | { |
1921 | // m_log.DebugFormat("[PHYSICS]: Removing {0} {1} from collision event reporting", obj.SOPName, obj.LocalID); | 1921 | // m_log.DebugFormat("[PHYSICS]: Removing {0} {1} from collision event reporting", obj.SOPName, obj.LocalID); |
1922 | 1922 | ||
1923 | lock (_collisionEventPrimChanges) | 1923 | lock (m_collisionEventActorsChanges) |
1924 | _collisionEventPrimChanges[obj.LocalID] = null; | 1924 | m_collisionEventActorsChanges[obj.LocalID] = null; |
1925 | } | 1925 | } |
1926 | 1926 | ||
1927 | #region Add/Remove Entities | 1927 | #region Add/Remove Entities |
@@ -2930,17 +2930,17 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2930 | // We change _collisionEventPrimChanges to avoid locking _collisionEventPrim itself and causing potential | 2930 | // We change _collisionEventPrimChanges to avoid locking _collisionEventPrim itself and causing potential |
2931 | // deadlock if the collision event tries to lock something else later on which is already locked by a | 2931 | // deadlock if the collision event tries to lock something else later on which is already locked by a |
2932 | // caller that is adding or removing the collision event. | 2932 | // caller that is adding or removing the collision event. |
2933 | lock (_collisionEventPrimChanges) | 2933 | lock (m_collisionEventActorsChanges) |
2934 | { | 2934 | { |
2935 | foreach (KeyValuePair<uint, PhysicsActor> kvp in _collisionEventPrimChanges) | 2935 | foreach (KeyValuePair<uint, PhysicsActor> kvp in m_collisionEventActorsChanges) |
2936 | { | 2936 | { |
2937 | if (kvp.Value == null) | 2937 | if (kvp.Value == null) |
2938 | _collisionEventPrim.Remove(kvp.Key); | 2938 | m_collisionEventActors.Remove(kvp.Key); |
2939 | else | 2939 | else |
2940 | _collisionEventPrim[kvp.Key] = kvp.Value; | 2940 | m_collisionEventActors[kvp.Key] = kvp.Value; |
2941 | } | 2941 | } |
2942 | 2942 | ||
2943 | _collisionEventPrimChanges.Clear(); | 2943 | m_collisionEventActorsChanges.Clear(); |
2944 | } | 2944 | } |
2945 | 2945 | ||
2946 | if (SupportsNINJAJoints) | 2946 | if (SupportsNINJAJoints) |
@@ -3092,7 +3092,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
3092 | tempTick = tempTick2; | 3092 | tempTick = tempTick2; |
3093 | } | 3093 | } |
3094 | 3094 | ||
3095 | foreach (PhysicsActor obj in _collisionEventPrim.Values) | 3095 | foreach (PhysicsActor obj in m_collisionEventActors.Values) |
3096 | { | 3096 | { |
3097 | // m_log.DebugFormat("[PHYSICS]: Assessing {0} {1} for collision events", obj.SOPName, obj.LocalID); | 3097 | // m_log.DebugFormat("[PHYSICS]: Assessing {0} {1} for collision events", obj.SOPName, obj.LocalID); |
3098 | 3098 | ||
@@ -3227,10 +3227,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
3227 | } | 3227 | } |
3228 | 3228 | ||
3229 | tickCountFrameRun = Util.EnvironmentTickCount(); | 3229 | tickCountFrameRun = Util.EnvironmentTickCount(); |
3230 | } | ||
3231 | 3230 | ||
3232 | if (CollectStats) | 3231 | if (CollectStats) |
3233 | m_stats[ODETotalFrameMsStatName] += Util.EnvironmentTickCountSubtract(startFrameTick); | 3232 | m_stats[ODETotalFrameMsStatName] += Util.EnvironmentTickCountSubtract(startFrameTick); |
3233 | } | ||
3234 | 3234 | ||
3235 | return fps; | 3235 | return fps; |
3236 | } | 3236 | } |