aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorTeravus Ovares2008-03-10 05:56:58 +0000
committerTeravus Ovares2008-03-10 05:56:58 +0000
commitd0123a796b0066a50914c6fae5d86550dcf58636 (patch)
tree5e7a5091afffc219c96c7649c4b2535215faf8e5 /OpenSim/Region/Physics/OdePlugin
parent* Added ODEPlugin Support for llSetBuoyancy. Set Buoyancy to 1 for space prim. (diff)
downloadopensim-SC_OLD-d0123a796b0066a50914c6fae5d86550dcf58636.zip
opensim-SC_OLD-d0123a796b0066a50914c6fae5d86550dcf58636.tar.gz
opensim-SC_OLD-d0123a796b0066a50914c6fae5d86550dcf58636.tar.bz2
opensim-SC_OLD-d0123a796b0066a50914c6fae5d86550dcf58636.tar.xz
ODEPlugin
* Added osSetPrimFloatOnWater(BOOL) to make Physical prim float at the water level. * osSetPrimFloatOnWater(TRUE); or osSetPrimFloatOnWater(FALSE); * By default, prim do not float at the water level. * More work is needed on the floating, but it's a start.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs5
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs32
2 files changed, 37 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 7047ec1..9bbbb22 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -185,6 +185,11 @@ namespace OpenSim.Region.Physics.OdePlugin
185 set { m_buoyancy = value; } 185 set { m_buoyancy = value; }
186 } 186 }
187 187
188 public override bool FloatOnWater
189 {
190 set { return; }
191 }
192
188 public override bool IsPhysical 193 public override bool IsPhysical
189 { 194 {
190 get { return false; } 195 get { return false; }
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 5291cbf..7cdc558 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -73,6 +73,7 @@ namespace OpenSim.Region.Physics.OdePlugin
73 public bool m_disabled = false; 73 public bool m_disabled = false;
74 public bool m_taintadd = false; 74 public bool m_taintadd = false;
75 public bool m_taintselected = false; 75 public bool m_taintselected = false;
76 public bool m_taintCollidesWater = false;
76 77
77 78
78 public uint m_localID = 0; 79 public uint m_localID = 0;
@@ -739,6 +740,11 @@ namespace OpenSim.Region.Physics.OdePlugin
739 740
740 if (m_taintparent != _parent) 741 if (m_taintparent != _parent)
741 changelink(timestep); 742 changelink(timestep);
743
744 if (m_taintCollidesWater != m_collidesWater)
745 changefloatonwater(timestep);
746
747
742 } 748 }
743 else 749 else
744 { 750 {
@@ -1333,6 +1339,24 @@ namespace OpenSim.Region.Physics.OdePlugin
1333 m_taintsize = _size; 1339 m_taintsize = _size;
1334 } 1340 }
1335 1341
1342 public void changefloatonwater(float timestep)
1343 {
1344 m_collidesWater = m_taintCollidesWater;
1345
1346 if (prim_geom != (IntPtr)0)
1347 {
1348 if (m_collidesWater)
1349 {
1350 m_collisionFlags |= CollisionCategories.Water;
1351 }
1352 else
1353 {
1354 m_collisionFlags &= ~CollisionCategories.Water;
1355 }
1356 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
1357 }
1358 }
1359
1336 public void changeshape(float timestamp) 1360 public void changeshape(float timestamp)
1337 { 1361 {
1338 1362
@@ -1895,6 +1919,14 @@ namespace OpenSim.Region.Physics.OdePlugin
1895 } 1919 }
1896 } 1920 }
1897 1921
1922 public override bool FloatOnWater
1923 {
1924 set {
1925 m_taintCollidesWater = value;
1926 _parent_scene.AddPhysicsActorTaint(this);
1927 }
1928 }
1929
1898 public override void SetMomentum(PhysicsVector momentum) 1930 public override void SetMomentum(PhysicsVector momentum)
1899 { 1931 {
1900 } 1932 }