aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorCharles Krinke2008-12-20 21:36:42 +0000
committerCharles Krinke2008-12-20 21:36:42 +0000
commit62dd67b8b8a7eb441d57f2b854444fbc5c4767d3 (patch)
treeb6c9f1123ae69ed2c6d67a4e939168b9140acb55 /OpenSim/Region/Physics/OdePlugin
parentMantis#2881. Thank you kindly, SirKimba for a patch that: (diff)
downloadopensim-SC-62dd67b8b8a7eb441d57f2b854444fbc5c4767d3.zip
opensim-SC-62dd67b8b8a7eb441d57f2b854444fbc5c4767d3.tar.gz
opensim-SC-62dd67b8b8a7eb441d57f2b854444fbc5c4767d3.tar.bz2
opensim-SC-62dd67b8b8a7eb441d57f2b854444fbc5c4767d3.tar.xz
Mantis#2796. Thank you kindly, Gerhard for a patch that addresses:
On a call of llVolumeDetect(1) (or any other number !=0) volume detection is enabled. Together with VD, the phantom flag is set to the GUI. On a call of llVolumeDetect(0), vd detection is switched of again, also the phantom state is removed. On a call to llSetState(STATE_PHANTOM, false) while VD is active, also VD is switched off. The same is true for unchecking the phantom flag via GUI. This allows to take back VD without the need to script just by removing the phantom flag. Things missing in this patch: persistance of the volume-detection flag. This needs more discussion and will be included in another patch soon.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs7
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs20
2 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 6f5abfa..b9c0936 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -127,6 +127,8 @@ namespace OpenSim.Region.Physics.OdePlugin
127 private bool m_isphysical = false; 127 private bool m_isphysical = false;
128 private bool m_isSelected = false; 128 private bool m_isSelected = false;
129 129
130 internal bool m_isVolumeDetect = false; // If true, this prim only detects collisions but doesn't collide actively
131
130 private bool m_throttleUpdates = false; 132 private bool m_throttleUpdates = false;
131 private int throttleCounter = 0; 133 private int throttleCounter = 0;
132 public int m_interpenetrationcount = 0; 134 public int m_interpenetrationcount = 0;
@@ -2226,7 +2228,10 @@ namespace OpenSim.Region.Physics.OdePlugin
2226 2228
2227 public override void SetVolumeDetect(int param) 2229 public override void SetVolumeDetect(int param)
2228 { 2230 {
2229 2231 lock (_parent_scene.OdeLock)
2232 {
2233 m_isVolumeDetect = (param!=0);
2234 }
2230 } 2235 }
2231 2236
2232 public override PhysicsVector CenterOfMass 2237 public override PhysicsVector CenterOfMass
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 7589750..c0b4b45 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -797,7 +797,25 @@ namespace OpenSim.Region.Physics.OdePlugin
797 797
798 #endregion 798 #endregion
799 799
800 if (contacts[i].depth >= 0f && !checkDupe(contacts[i], p2.PhysicsActorType)) 800 // Logic for collision handling
801 // Note, that if *all* contacts are skipped (VolumeDetect)
802 // The prim still detects (and forwards) collision events but
803 // appears to be phantom for the world
804 Boolean skipThisContact = false;
805
806 if (contacts[i].depth < 0f)
807 skipThisContact = true;
808
809 if (checkDupe(contacts[i], p2.PhysicsActorType))
810 skipThisContact = true;
811
812 if ((p1 is OdePrim) && (((OdePrim)p1).m_isVolumeDetect))
813 skipThisContact = true; // No collision on volume detect prims
814
815 if ((p2 is OdePrim) && (((OdePrim)p2).m_isVolumeDetect))
816 skipThisContact = true; // No collision on volume detect prims
817
818 if (!skipThisContact)
801 { 819 {
802 // If we're colliding against terrain 820 // If we're colliding against terrain
803 if (name1 == "Terrain" || name2 == "Terrain") 821 if (name1 == "Terrain" || name2 == "Terrain")