From 61bf2bf2ddce323255d7d009274d8da5a2da54c9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 2 Jun 2011 18:32:25 +0200 Subject: Make Buoyancy a prim property --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4e1d6b6..cb321aa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -338,6 +338,7 @@ namespace OpenSim.Region.Framework.Scenes protected Vector3 m_lastAcceleration; protected Vector3 m_lastAngularVelocity; protected int m_lastTerseSent; + protected float m_buoyancy = 0.0f; /// /// Stores media texture data @@ -1335,6 +1336,19 @@ namespace OpenSim.Region.Framework.Scenes set { m_collisionSoundVolume = value; } } + public float Buoyancy + { + get { return m_buoyancy; } + set + { + m_buoyancy = value; + if (PhysActor != null) + { + PhysActor.Buoyancy = value; + } + } + } + #endregion Public Properties with only Get #region Private Methods @@ -3275,14 +3289,6 @@ namespace OpenSim.Region.Framework.Scenes STATUS_ROTATE_Z = rotate; } - public void SetBuoyancy(float fvalue) - { - if (PhysActor != null) - { - PhysActor.Buoyancy = fvalue; - } - } - public void SetDieAtEdge(bool p) { if (m_parentGroup == null) -- cgit v1.1