aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs32
1 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs b/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
index b040e21..583c436 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
@@ -114,21 +114,25 @@ public class BasicVehicles : OpenSimTestCase
114 // Instead the appropriate values are set and calls are made just the parts of the 114 // Instead the appropriate values are set and calls are made just the parts of the
115 // controller we want to exercise. Stepping the physics engine then applies 115 // controller we want to exercise. Stepping the physics engine then applies
116 // the actions of that one feature. 116 // the actions of that one feature.
117 TestVehicle.VehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_EFFICIENCY, efficiency); 117 BSDynamics vehicleActor = TestVehicle.GetVehicleActor();
118 TestVehicle.VehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_TIMESCALE, timeScale); 118 if (vehicleActor != null)
119 TestVehicle.VehicleActor.enableAngularVerticalAttraction = true;
120
121 TestVehicle.IsPhysical = true;
122 PhysicsScene.ProcessTaints();
123
124 // Step the simulator a bunch of times and vertical attraction should orient the vehicle up
125 for (int ii = 0; ii < simSteps; ii++)
126 { 119 {
127 TestVehicle.VehicleActor.ForgetKnownVehicleProperties(); 120 vehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_EFFICIENCY, efficiency);
128 TestVehicle.VehicleActor.ComputeAngularVerticalAttraction(); 121 vehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_TIMESCALE, timeScale);
129 TestVehicle.VehicleActor.PushKnownChanged(); 122 vehicleActor.enableAngularVerticalAttraction = true;
130 123
131 PhysicsScene.Simulate(simulationTimeStep); 124 TestVehicle.IsPhysical = true;
125 PhysicsScene.ProcessTaints();
126
127 // Step the simulator a bunch of times and vertical attraction should orient the vehicle up
128 for (int ii = 0; ii < simSteps; ii++)
129 {
130 vehicleActor.ForgetKnownVehicleProperties();
131 vehicleActor.ComputeAngularVerticalAttraction();
132 vehicleActor.PushKnownChanged();
133
134 PhysicsScene.Simulate(simulationTimeStep);
135 }
132 } 136 }
133 137
134 TestVehicle.IsPhysical = false; 138 TestVehicle.IsPhysical = false;