Implement the plumbing for llSetVehicleType from the LSL

subroutine down through the physics modules through PhysActor
and SceneObjectPart. No connection to the physics simulators.
0.6.0-stable
Charles Krinke 2008-09-28 22:38:59 +00:00
parent 5ddba2a3a7
commit 6758ecc403
10 changed files with 70 additions and 1 deletions

View File

@ -2337,6 +2337,14 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
public void SetVehicleType(int type)
{
if (PhysActor != null)
{
PhysActor.VehicleType = type;
}
}
public void SetVehicleFloatParam(int param, float value) public void SetVehicleFloatParam(int param, float value)
{ {
if (PhysActor != null) if (PhysActor != null)

View File

@ -335,6 +335,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
set { return; } set { return; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {

View File

@ -950,6 +950,12 @@ namespace OpenSim.Region.Physics.BulletXPlugin
set { return; } set { return; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {

View File

@ -175,6 +175,7 @@ namespace OpenSim.Region.Physics.Manager
public abstract float Mass { get; } public abstract float Mass { get; }
public abstract PhysicsVector Force { get; set; } public abstract PhysicsVector Force { get; set; }
public abstract int VehicleType { get; set; }
public abstract void VehicleFloatParam(int param, float value); public abstract void VehicleFloatParam(int param, float value);
public abstract void VehicleVectorParam(int param, PhysicsVector value); public abstract void VehicleVectorParam(int param, PhysicsVector value);
public abstract void VehicleRotationParam(int param, Quaternion rotation); public abstract void VehicleRotationParam(int param, Quaternion rotation);
@ -281,6 +282,12 @@ namespace OpenSim.Region.Physics.Manager
set { return; } set { return; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {

View File

@ -537,6 +537,12 @@ namespace OpenSim.Region.Physics.OdePlugin
set { return; } set { return; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {

View File

@ -1876,6 +1876,12 @@ namespace OpenSim.Region.Physics.OdePlugin
set { m_force = value; } set { m_force = value; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {

View File

@ -159,6 +159,12 @@ namespace OpenSim.Region.Physics.POSPlugin
set { return; } set { return; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {

View File

@ -121,6 +121,12 @@ namespace OpenSim.Region.Physics.POSPlugin
set { return; } set { return; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {

View File

@ -343,6 +343,12 @@ namespace OpenSim.Region.Physics.PhysXPlugin
set { return; } set { return; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {
@ -688,6 +694,12 @@ namespace OpenSim.Region.Physics.PhysXPlugin
set { return; } set { return; }
} }
public override int VehicleType
{
get { return 0; }
set { return; }
}
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {

View File

@ -5159,7 +5159,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llSetVehicleType(int type) public void llSetVehicleType(int type)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llSetVehicleType"); if (m_host.ParentGroup != null)
{
if (m_host.ParentGroup.RootPart != null)
{
m_host.ParentGroup.RootPart.SetVehicleType(type);
}
}
} }
//CFK 9/28: Most, but not all of the underlying plumbing between here and the physics modules is in //CFK 9/28: Most, but not all of the underlying plumbing between here and the physics modules is in