aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-08-19 21:28:40 +0100
committerUbitUmarov2016-08-19 21:28:40 +0100
commit6ad0f3250b31c392560af70330269ab7db9664a6 (patch)
tree9e06ec6afa7932c4bb3b53d865c246176bb2609e /OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
parent on sog unlink loose the reference to the deleted physics actor (diff)
downloadopensim-SC-6ad0f3250b31c392560af70330269ab7db9664a6.zip
opensim-SC-6ad0f3250b31c392560af70330269ab7db9664a6.tar.gz
opensim-SC-6ad0f3250b31c392560af70330269ab7db9664a6.tar.bz2
opensim-SC-6ad0f3250b31c392560af70330269ab7db9664a6.tar.xz
fix ubOde prims unlink that got broken fixing sleeping bodies collisions, core removes and adds a prim with same LocalID not giving time for physics to actuly delete, so when it did it LocalID was lost
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs19
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
index 6c5b405..623e6be 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
@@ -1328,8 +1328,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1328 { 1328 {
1329 1329
1330 newPrim = new OdePrim(name, this, position, size, rotation, pbs, isphysical, isPhantom, shapeType, localID); 1330 newPrim = new OdePrim(name, this, position, size, rotation, pbs, isphysical, isPhantom, shapeType, localID);
1331 lock (_prims)
1332 _prims[newPrim.LocalID] = newPrim;
1333 } 1331 }
1334 return newPrim; 1332 return newPrim;
1335 } 1333 }
@@ -1350,7 +1348,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1350 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 1348 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
1351 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapeType, uint localid) 1349 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapeType, uint localid)
1352 { 1350 {
1353
1354 return AddPrim(primName, position, size, rotation, pbs, isPhysical,isPhantom, shapeType, localid); 1351 return AddPrim(primName, position, size, rotation, pbs, isPhysical,isPhantom, shapeType, localid);
1355 } 1352 }
1356 1353
@@ -1396,6 +1393,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1396 1393
1397 } 1394 }
1398 1395
1396 public void addToPrims(OdePrim prim)
1397 {
1398 lock (_prims)
1399 _prims[prim.LocalID] = prim;
1400 }
1401
1399 public OdePrim getPrim(uint id) 1402 public OdePrim getPrim(uint id)
1400 { 1403 {
1401 lock (_prims) 1404 lock (_prims)
@@ -1413,6 +1416,16 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1413 return _prims.ContainsKey(prm.LocalID); 1416 return _prims.ContainsKey(prm.LocalID);
1414 } 1417 }
1415 1418
1419 public void changePrimID(OdePrim prim,uint oldID)
1420 {
1421 lock (_prims)
1422 {
1423 if(_prims.ContainsKey(oldID))
1424 _prims.Remove(oldID);
1425 _prims[prim.LocalID] = prim;
1426 }
1427 }
1428
1416 public bool haveActor(PhysicsActor actor) 1429 public bool haveActor(PhysicsActor actor)
1417 { 1430 {
1418 if (actor is OdePrim) 1431 if (actor is OdePrim)