diff options
author | UbitUmarov | 2016-11-10 23:07:57 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-10 23:07:57 +0000 |
commit | 58b7be48a9466ee8df670e743bfa1711fe6a6450 (patch) | |
tree | c8e797b188bfc3ba6548827edaee1b839ce9bfc7 /OpenSim/Region/PhysicsModules/ubOde | |
parent | also cache not found useraccounts when search by ID. Change the expire time t... (diff) | |
download | opensim-SC-58b7be48a9466ee8df670e743bfa1711fe6a6450.zip opensim-SC-58b7be48a9466ee8df670e743bfa1711fe6a6450.tar.gz opensim-SC-58b7be48a9466ee8df670e743bfa1711fe6a6450.tar.bz2 opensim-SC-58b7be48a9466ee8df670e743bfa1711fe6a6450.tar.xz |
ubOde: add a needed lock
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOde')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index 6267051..f642699 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | |||
@@ -1221,8 +1221,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
1221 | /// <param name="obj"></param> | 1221 | /// <param name="obj"></param> |
1222 | public void RemoveCollisionEventReporting(PhysicsActor obj) | 1222 | public void RemoveCollisionEventReporting(PhysicsActor obj) |
1223 | { | 1223 | { |
1224 | if (_collisionEventPrim.Contains(obj) && !_collisionEventPrimRemove.Contains(obj)) | 1224 | lock(_collisionEventPrimRemove) |
1225 | _collisionEventPrimRemove.Add(obj); | 1225 | { |
1226 | if (_collisionEventPrim.Contains(obj) && !_collisionEventPrimRemove.Contains(obj)) | ||
1227 | _collisionEventPrimRemove.Add(obj); | ||
1228 | } | ||
1226 | } | 1229 | } |
1227 | 1230 | ||
1228 | public override float TimeDilation | 1231 | public override float TimeDilation |
@@ -1759,10 +1762,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
1759 | prm.SleeperAddCollisionEvents(); | 1762 | prm.SleeperAddCollisionEvents(); |
1760 | sleepers.Clear(); | 1763 | sleepers.Clear(); |
1761 | 1764 | ||
1762 | foreach (PhysicsActor obj in _collisionEventPrimRemove) | 1765 | lock(_collisionEventPrimRemove) |
1763 | _collisionEventPrim.Remove(obj); | 1766 | { |
1767 | foreach (PhysicsActor obj in _collisionEventPrimRemove) | ||
1768 | _collisionEventPrim.Remove(obj); | ||
1764 | 1769 | ||
1765 | _collisionEventPrimRemove.Clear(); | 1770 | _collisionEventPrimRemove.Clear(); |
1771 | } | ||
1766 | 1772 | ||
1767 | // do a ode simulation step | 1773 | // do a ode simulation step |
1768 | d.WorldQuickStep(world, ODE_STEPSIZE); | 1774 | d.WorldQuickStep(world, ODE_STEPSIZE); |