From 5351ff925c20c0fd189ee7de85c31521aca8cdf3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 18 Feb 2012 14:08:42 +0000 Subject: let SOG know about vehicles. Still needs serialization and applyphyscis on deserialize, etc --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 42 ++++++++++------------ 1 file changed, 19 insertions(+), 23 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 19dedde..6438694 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -3170,34 +3170,37 @@ namespace OpenSim.Region.Framework.Scenes public void SetVehicleType(int type) { - if (PhysActor != null) - { - PhysActor.VehicleType = type; - } + if (ParentGroup.IsDeleted) + return; + ParentGroup.VehicleType = type; + } + + public void SetVehicleFlags(int param, bool remove) + { + if (ParentGroup.IsDeleted) + return; + ParentGroup.SetVehicleFlags(param, remove); } public void SetVehicleFloatParam(int param, float value) { - if (PhysActor != null) - { - PhysActor.VehicleFloatParam(param, value); - } + if (ParentGroup.IsDeleted) + return; + ParentGroup.SetVehicleFloatParam(param, value); } public void SetVehicleVectorParam(int param, Vector3 value) { - if (PhysActor != null) - { - PhysActor.VehicleVectorParam(param, value); - } + if (ParentGroup.IsDeleted) + return; + ParentGroup.SetVehicleVectorParam(param, value); } public void SetVehicleRotationParam(int param, Quaternion rotation) { - if (PhysActor != null) - { - PhysActor.VehicleRotationParam(param, rotation); - } + if (ParentGroup.IsDeleted) + return; + ParentGroup.SetVehicleRotationParam(param, rotation); } /// @@ -3381,13 +3384,6 @@ namespace OpenSim.Region.Framework.Scenes hasProfileCut = hasDimple; // is it the same thing? } - public void SetVehicleFlags(int param, bool remove) - { - if (PhysActor != null) - { - PhysActor.VehicleFlags(param, remove); - } - } public void SetGroup(UUID groupID, IClientAPI client) { -- cgit v1.1