aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs32
1 files changed, 32 insertions, 0 deletions
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 }