diff options
author | Teravus Ovares | 2008-02-21 14:51:39 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-21 14:51:39 +0000 |
commit | 640ad259d4ee1bd9cdf56714f857811c73b09383 (patch) | |
tree | 4209df9e4abdebe7ed8d178e48b4e5f7ecd9fed2 | |
parent | ScriptEngine changes in locking. Another step in direction of shared threads. (diff) | |
download | opensim-SC_OLD-640ad259d4ee1bd9cdf56714f857811c73b09383.zip opensim-SC_OLD-640ad259d4ee1bd9cdf56714f857811c73b09383.tar.gz opensim-SC_OLD-640ad259d4ee1bd9cdf56714f857811c73b09383.tar.bz2 opensim-SC_OLD-640ad259d4ee1bd9cdf56714f857811c73b09383.tar.xz |
* A few additional null checks in the Physics Scene and PhysicsActor so we don't try to enumerate dead null ODECharacter objects when things get *really* slow.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 6 |
2 files changed, 6 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index f44c160..7e88479 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -139,10 +139,9 @@ namespace OpenSim.Region.Physics.Manager | |||
139 | 139 | ||
140 | if (handler != null) | 140 | if (handler != null) |
141 | { | 141 | { |
142 | lock (handler) | 142 | |
143 | { | ||
144 | handler(); | 143 | handler(); |
145 | } | 144 | |
146 | } | 145 | } |
147 | } | 146 | } |
148 | 147 | ||
@@ -154,10 +153,7 @@ namespace OpenSim.Region.Physics.Manager | |||
154 | OutOfBounds handler = OnOutOfBounds; | 153 | OutOfBounds handler = OnOutOfBounds; |
155 | if (handler != null) | 154 | if (handler != null) |
156 | { | 155 | { |
157 | lock (handler) | ||
158 | { | ||
159 | handler(pos); | 156 | handler(pos); |
160 | } | ||
161 | } | 157 | } |
162 | } | 158 | } |
163 | 159 | ||
@@ -167,10 +163,7 @@ namespace OpenSim.Region.Physics.Manager | |||
167 | 163 | ||
168 | if (handler != null) | 164 | if (handler != null) |
169 | { | 165 | { |
170 | lock (handler) | ||
171 | { | ||
172 | handler(e); | 166 | handler(e); |
173 | } | ||
174 | } | 167 | } |
175 | 168 | ||
176 | } | 169 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a8ee20d..b3780fd 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -1272,7 +1272,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1272 | { | 1272 | { |
1273 | foreach (OdeCharacter actor in _characters) | 1273 | foreach (OdeCharacter actor in _characters) |
1274 | { | 1274 | { |
1275 | actor.Move(timeStep); | 1275 | if (actor != null) |
1276 | actor.Move(timeStep); | ||
1276 | } | 1277 | } |
1277 | 1278 | ||
1278 | collision_optimized(timeStep); | 1279 | collision_optimized(timeStep); |
@@ -1300,7 +1301,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1300 | 1301 | ||
1301 | foreach (OdeCharacter actor in _characters) | 1302 | foreach (OdeCharacter actor in _characters) |
1302 | { | 1303 | { |
1303 | actor.UpdatePositionAndVelocity(); | 1304 | if (actor != null) |
1305 | actor.UpdatePositionAndVelocity(); | ||
1304 | } | 1306 | } |
1305 | 1307 | ||
1306 | if (!ode.lockquery()) | 1308 | if (!ode.lockquery()) |