102 , axis_key( 0, 0, 0 )
104 this->last_jumped = 0;
116 if (initialJoyMode ==
"inertialxy")
119 else if (initialJoyMode ==
"inertialxz")
122 else if (initialJoyMode ==
"roll")
125 else if (initialJoyMode ==
"bank")
129 #define FBWABS( m ) (m >= 0 ? m : -m)
133 #define SSCK (starshipcontrolkeys[whichplayer])
135 printf(
"Stopping a NETCOMM\n" );
137 SSCK.commchanged =
false;
140 printf(
"Starting a NETCOMM\n" );
142 SSCK.commchanged =
false;
145 SSCK.freq_increase =
false;
149 SSCK.freq_decrease =
false;
153 SSCK.switchwebcam =
false;
157 SSCK.switchsecured =
false;
161 SSCK.setunvel =
false;
166 static bool onlyupgraderef =
170 && !onlyupgraderef) || t->
faction == neu || t->
faction == upg || allowanyreference )
174 if (
SSCK.setnulvel) {
175 SSCK.setnulvel =
false;
178 if (
SSCK.switch_combat_mode) {
179 SSCK.switch_combat_mode =
false;
194 static bool autodock =
196 Order *autoNavigator = NULL;
205 if (autoNavigator == NULL)
208 autoNavigator->SetParent(
parent );
215 bool enteredautopilot =
false;
220 enteredautopilot =
true;
221 SSCK.realauto =
false;
225 if (resetangvelocity)
230 if (
SSCK.uppress <= 0 &&
SSCK.downpress <= 0) {
233 if (
SSCK.uppress > 0)
235 if (
SSCK.downpress > 0)
238 if (
SSCK.leftpress <= 0 &&
SSCK.rightpress <= 0) {
241 if (
SSCK.rightpress > 0)
243 if (
SSCK.leftpress > 0)
246 if (
SSCK.rollrightpress <= 0 &&
SSCK.rollleftpress <= 0) {
249 if (
SSCK.rollrightpress > 0)
251 if (
SSCK.rollleftpress > 0)
254 if (
SSCK.ABpress >= 1)
258 if (
SSCK.joyinertialxypress > 0)
260 if (
SSCK.joyinertialxzpress > 0)
262 if (
SSCK.joyrollpress > 0)
264 if (
SSCK.joybankpress > 0)
266 if (
SSCK.inertialflightpress > 0)
268 if (
SSCK.accelpress > 0)
270 if (
SSCK.decelpress > 0)
273 if (
SSCK.uppress == 0 &&
SSCK.downpress == 0) {
276 if (
SSCK.uppress != 0 &&
SSCK.downpress == 0) {
279 if (
SSCK.downpress != 0 &&
SSCK.uppress == 0) {
288 if (
SSCK.rightpress == 0 &&
SSCK.leftpress == 0) {
291 if (
SSCK.rightpress != 0 &&
SSCK.leftpress == 0) {
294 if (
SSCK.leftpress != 0 &&
SSCK.rightpress == 0) {
303 if (
SSCK.rollrightpress == 0 &&
SSCK.rollleftpress == 0) {
306 if (
SSCK.rollrightpress != 0 &&
SSCK.rollleftpress == 0) {
310 if (
SSCK.rollleftpress != 0 &&
SSCK.rollrightpress == 0) {
317 +
SSCK.rollrightrelease) );
321 if (
SSCK.accelpress != 0)
323 if (
SSCK.decelpress != 0)
327 if (
SSCK.joyinertialxypress ||
SSCK.joyinertialxyrelease) {
328 if (
SSCK.joyinertialxypress > 0)
334 if (
SSCK.joyinertialxzpress ||
SSCK.joyinertialxzrelease) {
335 if (
SSCK.joyinertialxzpress > 0)
341 if (
SSCK.joyrollpress ||
SSCK.joyrollrelease) {
342 if (
SSCK.joyrollpress > 0)
348 if (
SSCK.joybankpress ||
SSCK.joybankrelease) {
349 if (
SSCK.joybankpress > 0)
355 if (
SSCK.inertialflightpress ||
SSCK.inertialflightrelease) {
356 if (
SSCK.inertialflightpress > 0)
363 if (
SSCK.stoppress) {
365 SSCK.stoppress =
false;
367 if (
SSCK.startpress || enteredautopilot) {
369 SSCK.startpress =
false;
371 if (
SSCK.sheltonpress > 0)
375 if (
SSCK.switchinertialflight) {
377 SSCK.switchinertialflight =
false;
379 if (
SSCK.switchjoyinertialxy) {
381 SSCK.switchjoyinertialxy =
false;
383 if (
SSCK.switchjoyinertialxz) {
385 SSCK.switchjoyinertialxz =
false;
387 if (
SSCK.switchjoyroll) {
389 SSCK.switchjoyroll =
false;
391 if (
SSCK.switchjoybank) {
393 SSCK.switchjoybank =
false;
403 if (
SSCK.autopilot && !autopilot) {
406 SSCK.autopilot =
false;
408 if (
SSCK.autopilot ||
SSCK.terminateauto) {
413 SSCK.autopilot =
false;
414 SSCK.terminateauto =
false;
416 if (
SSCK.matchspeed) {
417 SSCK.matchspeed =
false;
422 static unsigned int counter = 0;
426 if ( (counter-last_jumped) >
static_cast<unsigned>(jump_key_delay/
SIMULATION_ATOM) || last_jumped == 0) {
427 last_jumped = counter;
431 if (foobar.
sound == -2) {
438 SSCK.jumpkey =
false;
501 printf(
"Pressed NETCOMM key !!!\n" );
502 if (
g().startcomm ==
true)
524 printf(
"Pressed SWITCHWEBCAM key !!!\n" );
543 printf(
"Pressed SWITCHSECURED key !!!\n" );