aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
diff options
context:
space:
mode:
authorMelanie2013-07-04 22:32:58 +0100
committerMelanie2013-07-04 22:32:58 +0100
commit5ddcc25ee9de481c40a26aabc57d77c71225162e (patch)
tree298768abaca492365ac1c9786b0d4ce7dae934ab /OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs
parentMerge branch 'master' into careminster (diff)
parentGuard against completely unknown user UUIDs. (diff)
downloadopensim-SC_OLD-5ddcc25ee9de481c40a26aabc57d77c71225162e.zip
opensim-SC_OLD-5ddcc25ee9de481c40a26aabc57d77c71225162e.tar.gz
opensim-SC_OLD-5ddcc25ee9de481c40a26aabc57d77c71225162e.tar.bz2
opensim-SC_OLD-5ddcc25ee9de481c40a26aabc57d77c71225162e.tar.xz
Merge branch 'master' into careminster
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;