38 :
ShipAI(s), complete(false), brakes(0),
39 drop_state(0), quantum_state(0), farcaster(0), terrain_warning(false)
88 static double time_til_change = 0.0;
90 if (time_til_change < 0.001) {
98 time_til_change = 0.5f;
104 time_til_change = 0.5f;
108 if (level < 25) level = 25;
109 else if (level < 50) level = 50;
110 else if (level < 75) level = 75;
115 time_til_change = 0.5f;
119 if (level > 75) level = 75;
120 else if (level > 50) level = 50;
121 else if (level > 25) level = 25;
126 time_til_change = 0.5f;
190 if (self_rgn && !nav_rgn) {
195 if (self_rgn == nav_rgn) {
248 if (dest && dest->
GetRegion() == nav_rgn) {
267 double r3 = (npt - apt).length();
269 if (r1+r2 < 1.2*r3) {
381 double deflection = vrt.
y;
382 if (deflection != 0) {
383 double theta = asin(deflection/vrt.
length());
384 self->ApplyRoll(-theta);
404 bool augmenter =
false;
420 if (ship_speed > speed + 10)
423 else if (ship_speed < speed - 10)
431 if (ship_speed > speed+5)
434 else if (ship_speed < speed-5)
444 if (ship_speed < 250) {
448 if (ship_speed < 200)
461 if (ship_speed > 1 &&
brakes > 0)
492 if (distance < 2 * self->Radius()) {
535 result.
yaw = atan2(point.
x, point.
z) +
PI;
537 double adjacent = sqrt(point.
x * point.
x + point.
z * point.
z);
539 result.
pitch = atan(point.
y / adjacent);
541 if (_isnan(result.
yaw))
544 if (_isnan(result.
pitch))