Add glue for llSetVehicleFlags(), llRemoveVehicleFlags(). ChODE: Add associated methods.

avinationmerge
Kitto Flora 2010-01-21 19:31:02 -05:00
parent 66692f90e3
commit 1abb70cc73
15 changed files with 174 additions and 4 deletions

View File

@ -2963,7 +2963,23 @@ namespace OpenSim.Region.Framework.Scenes
PhysActor.VehicleRotationParam(param, rotation);
}
}
public void SetVehicleFlags(int flags)
{
if (PhysActor != null)
{
PhysActor.VehicleFlagsSet(flags);
}
}
public void RemoveVehicleFlags(int flags)
{
if (PhysActor != null)
{
PhysActor.VehicleFlagsRemove(flags);
}
}
public void SetGroup(UUID groupID, IClientAPI client)
{
_groupID = groupID;

View File

@ -184,7 +184,17 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -361,7 +361,17 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -396,7 +396,17 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
{
//TODO:
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{
//TODO: GhostObject

View File

@ -984,7 +984,17 @@ namespace OpenSim.Region.Physics.BulletXPlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -733,7 +733,17 @@ namespace OpenSim.Region.Physics.OdePlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -286,7 +286,17 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}//end ProcessRotationVehicleParam
internal void ProcessFlagsVehicleSet(int flags)
{
m_flags |= (VehicleFlag)flags;
}
internal void ProcessFlagsVehicleRemove(int flags)
{
m_flags &= ~((VehicleFlag)flags);
}
internal void ProcessTypeChange(Vehicle pType)
{
// Set Defaults For Type

View File

@ -2415,7 +2415,17 @@ Console.WriteLine(" JointCreateFixed");
{
m_vehicle.ProcessRotationVehicleParam((Vehicle) param, rotation);
}
public override void VehicleFlagsSet(int flags)
{
m_vehicle.ProcessFlagsVehicleSet(flags);
}
public override void VehicleFlagsRemove(int flags)
{
m_vehicle.ProcessFlagsVehicleRemove(flags);
}
public override void SetVolumeDetect(int param)
{
lock (_parent_scene.OdeLock)

View File

@ -208,6 +208,8 @@ namespace OpenSim.Region.Physics.Manager
public abstract void VehicleFloatParam(int param, float value);
public abstract void VehicleVectorParam(int param, Vector3 value);
public abstract void VehicleRotationParam(int param, Quaternion rotation);
public abstract void VehicleFlagsSet(int flags);
public abstract void VehicleFlagsRemove(int flags);
public abstract void SetVolumeDetect(int param); // Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
@ -351,7 +353,17 @@ namespace OpenSim.Region.Physics.Manager
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -733,7 +733,17 @@ namespace OpenSim.Region.Physics.OdePlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -2352,6 +2352,16 @@ Console.WriteLine(" JointCreateFixed");
{
m_vehicle.ProcessRotationVehicleParam((Vehicle) param, rotation);
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -181,7 +181,17 @@ namespace OpenSim.Region.Physics.POSPlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -138,7 +138,17 @@ namespace OpenSim.Region.Physics.POSPlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -370,7 +370,17 @@ namespace OpenSim.Region.Physics.PhysXPlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{
@ -774,7 +784,17 @@ namespace OpenSim.Region.Physics.PhysXPlugin
{
}
public override void VehicleFlagsSet(int flags)
{
}
public override void VehicleFlagsRemove(int flags)
{
}
public override void SetVolumeDetect(int param)
{

View File

@ -6315,13 +6315,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llSetVehicleFlags(int flags)
{
m_host.AddScriptLPS(1);
NotImplemented("llSetVehicleFlags");
if (m_host.ParentGroup != null)
{
if (!m_host.ParentGroup.IsDeleted)
{
m_host.ParentGroup.RootPart.SetVehicleFlags(flags);
}
}
}
public void llRemoveVehicleFlags(int flags)
{
m_host.AddScriptLPS(1);
NotImplemented("llRemoveVehicleFlags");
if (m_host.ParentGroup != null)
{
if (!m_host.ParentGroup.IsDeleted)
{
m_host.ParentGroup.RootPart.RemoveVehicleFlags(flags);
}
}
}
public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)