aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs31
1 files changed, 25 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 732d99b..e3ac668 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -1339,20 +1339,39 @@ namespace OpenSim.Region.Physics.OdePlugin
1339 OdeCharacter newAv = new OdeCharacter(avName, this, pos, ode, size, avPIDD, avPIDP, avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avMovementDivisorWalk, avMovementDivisorRun); 1339 OdeCharacter newAv = new OdeCharacter(avName, this, pos, ode, size, avPIDD, avPIDP, avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avMovementDivisorWalk, avMovementDivisorRun);
1340 newAv.Flying = isFlying; 1340 newAv.Flying = isFlying;
1341 newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset; 1341 newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;
1342 _characters.Add(newAv); 1342
1343 return newAv; 1343 return newAv;
1344 } 1344 }
1345 1345
1346 public override void RemoveAvatar(PhysicsActor actor) 1346 public void AddCharacter(OdeCharacter chr)
1347 { 1347 {
1348 lock (OdeLock) 1348 lock (_characters)
1349 { 1349 {
1350 //m_log.Debug("[PHYSICS]:ODELOCK"); 1350 if (!_characters.Contains(chr))
1351 ((OdeCharacter) actor).Destroy(); 1351 {
1352 _characters.Remove((OdeCharacter) actor); 1352 _characters.Add(chr);
1353 }
1353 } 1354 }
1354 } 1355 }
1355 1356
1357 public void RemoveCharacter(OdeCharacter chr)
1358 {
1359 lock (_characters)
1360 {
1361 if (_characters.Contains(chr))
1362 {
1363 _characters.Remove(chr);
1364 }
1365 }
1366 }
1367
1368 public override void RemoveAvatar(PhysicsActor actor)
1369 {
1370 //m_log.Debug("[PHYSICS]:ODELOCK");
1371 ((OdeCharacter) actor).Destroy();
1372
1373 }
1374
1356 private PhysicsActor AddPrim(String name, PhysicsVector position, PhysicsVector size, Quaternion rotation, 1375 private PhysicsActor AddPrim(String name, PhysicsVector position, PhysicsVector size, Quaternion rotation,
1357 IMesh mesh, PrimitiveBaseShape pbs, bool isphysical) 1376 IMesh mesh, PrimitiveBaseShape pbs, bool isphysical)
1358 { 1377 {