mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Make Buoyancy a prim property
This commit is contained in:
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// 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)
|
||||
|
||||
Reference in New Issue
Block a user