mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
moved vehicle from SOG to SOP
This commit is contained in:
@@ -115,90 +115,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
private bool m_suspendUpdates;
|
||||
private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>();
|
||||
|
||||
private SOGVehicle m_vehicle = null;
|
||||
|
||||
public int VehicleType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_vehicle == null)
|
||||
return (int)Vehicle.TYPE_NONE;
|
||||
else
|
||||
return (int)m_vehicle.Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_vehicle = null;
|
||||
if (value == (int)Vehicle.TYPE_NONE)
|
||||
{
|
||||
if (RootPart.PhysActor != null)
|
||||
RootPart.PhysActor.VehicleType = (int)Vehicle.TYPE_NONE;
|
||||
return;
|
||||
}
|
||||
m_vehicle = new SOGVehicle();
|
||||
m_vehicle.ProcessTypeChange((Vehicle)value);
|
||||
{
|
||||
if (RootPart.PhysActor != null)
|
||||
RootPart.PhysActor.VehicleType = value;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void SetVehicleFlags(int param, bool remove)
|
||||
{
|
||||
if (m_vehicle == null)
|
||||
return;
|
||||
|
||||
m_vehicle.ProcessVehicleFlags(param, remove);
|
||||
|
||||
if (RootPart.PhysActor != null)
|
||||
{
|
||||
RootPart.PhysActor.VehicleFlags(param, remove);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetVehicleFloatParam(int param, float value)
|
||||
{
|
||||
if (m_vehicle == null)
|
||||
return;
|
||||
|
||||
m_vehicle.ProcessFloatVehicleParam((Vehicle)param, value);
|
||||
|
||||
if (RootPart.PhysActor != null)
|
||||
{
|
||||
RootPart.PhysActor.VehicleFloatParam(param, value);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetVehicleVectorParam(int param, Vector3 value)
|
||||
{
|
||||
if (m_vehicle == null)
|
||||
return;
|
||||
|
||||
m_vehicle.ProcessVectorVehicleParam((Vehicle)param, value);
|
||||
|
||||
if (RootPart.PhysActor != null)
|
||||
{
|
||||
RootPart.PhysActor.VehicleVectorParam(param, value);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetVehicleRotationParam(int param, Quaternion rotation)
|
||||
{
|
||||
if (m_vehicle == null)
|
||||
return;
|
||||
|
||||
m_vehicle.ProcessRotationVehicleParam((Vehicle)param, rotation);
|
||||
|
||||
if (RootPart.PhysActor != null)
|
||||
{
|
||||
RootPart.PhysActor.VehicleRotationParam(param, rotation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool areUpdatesSuspended
|
||||
{
|
||||
get
|
||||
@@ -1782,8 +1698,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// ResetChildPrimPhysicsPositions();
|
||||
if (m_rootPart.PhysActor != null)
|
||||
{
|
||||
if (m_vehicle != null)
|
||||
m_vehicle.SetVehicle(m_rootPart.PhysActor);
|
||||
m_rootPart.PhysActor.Building = false;
|
||||
}
|
||||
}
|
||||
@@ -1791,10 +1705,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
// Apply physics to the root prim
|
||||
m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false);
|
||||
if (m_rootPart.PhysActor != null && m_vehicle != null)
|
||||
{
|
||||
m_vehicle.SetVehicle(m_rootPart.PhysActor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user