2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on the
13 #include "osregistry.h"
19 static int Joy_ff_enabled = 0;
20 static int Joy_ff_acquired = 0;
21 static SDL_Haptic *haptic = NULL;
22 static int joy_ff_handling_scaler = 0;
23 static int Joy_ff_directional_hit_effect_enabled = 1;
24 static int Joy_rumble = 0;
25 static int Joy_ff_afterburning = 0;
33 static haptic_effect_t pHitEffect1;
34 static haptic_effect_t pHitEffect2;
35 static haptic_effect_t pAfterburn1;
36 static haptic_effect_t pAfterburn2;
37 static haptic_effect_t pShootEffect;
38 static haptic_effect_t pSecShootEffect;
39 static haptic_effect_t pSpring;
40 static haptic_effect_t pDock;
42 static void joy_ff_create_effects();
43 static int joy_ff_effect_playing(haptic_effect_t *eff);
44 static void joy_ff_start_effect(haptic_effect_t *eff, const char *name);
46 extern SDL_Joystick *sdljoy;
53 ff_enabled = os_config_read_uint("Controls", "EnableJoystickFF", 0);
55 if ( !ff_enabled || !SDL_JoystickIsHaptic(sdljoy) ) {
59 if (SDL_InitSubSystem(SDL_INIT_HAPTIC) < 0) {
60 mprintf((" ERROR: Unable to initialize haptic subsystem\n"));
64 haptic = SDL_HapticOpenFromJoystick(sdljoy);
67 mprintf((" ERROR: Unable to open haptic joystick\n"));
68 SDL_QuitSubSystem(SDL_INIT_HAPTIC);
72 if ( SDL_HapticRumbleSupported(haptic) ) {
73 SDL_HapticRumbleInit(haptic);
77 mprintf((" Rumble : %s\n", Joy_rumble ? "Yes" : "No"));
78 mprintf((" Haptic Axes : %d\n", SDL_HapticNumAxes(haptic)));
79 mprintf((" Max effects : %d\n", SDL_HapticNumEffects(haptic)));
80 mprintf((" Running effects : %d\n", SDL_HapticNumEffectsPlaying(haptic)));
82 joy_ff_create_effects();
87 Joy_ff_directional_hit_effect_enabled = os_config_read_uint("Controls", "EnableHitEffect", 1);
92 void joy_ff_shutdown()
94 if ( !Joy_ff_enabled ) {
98 SDL_HapticStopAll(haptic);
102 SDL_HapticClose(haptic);
105 SDL_QuitSubSystem(SDL_INIT_HAPTIC);
111 static void joy_ff_create_effects()
113 // clear all SDL errors
116 unsigned int supported = 0;
118 supported = SDL_HapticQuery(haptic);
120 if ( !(supported & SDL_HAPTIC_CONSTANT) ) {
121 mprintf((" Constant Force : not supported\n"));
124 if ( !(supported & SDL_HAPTIC_SINE) ) {
125 mprintf((" Sine Wave : not supported\n"));
128 if ( !(supported & SDL_HAPTIC_SAWTOOTHDOWN) ) {
129 mprintf((" Sawtooth Down : not supported\n"));
132 if ( !(supported & SDL_HAPTIC_SPRING) ) {
133 mprintf((" Spring : not supported\n"));
136 if ( !(supported & SDL_HAPTIC_SQUARE) ) {
137 mprintf((" Square : not supported\n"));
140 if ( !(supported & SDL_HAPTIC_TRIANGLE) ) {
141 mprintf((" Triangle : not supported\n"));
145 if (supported & SDL_HAPTIC_SPRING) {
147 memset(&pSpring, 0, sizeof(haptic_effect_t));
149 pSpring.eff.type = SDL_HAPTIC_SPRING;
150 pSpring.eff.condition.length = SDL_HAPTIC_INFINITY;
152 for (int i = 0; i < SDL_HapticNumAxes(haptic); i++) {
153 pSpring.eff.condition.right_sat[i] = 0x7FFF;
154 pSpring.eff.condition.left_sat[i] = 0x7FFF;
155 pSpring.eff.condition.right_coeff[i] = 0x147;
156 pSpring.eff.condition.left_coeff[i] = 0x147;
159 pSpring.id = SDL_HapticNewEffect(haptic, &pSpring.eff);
161 if (pSpring.id < 0) {
162 mprintf((" Spring effect failed to load:\n %s\n", SDL_GetError()));
168 if (supported & SDL_HAPTIC_SAWTOOTHDOWN) {
170 memset(&pShootEffect, 0, sizeof(haptic_effect_t));
172 pShootEffect.eff.type = SDL_HAPTIC_SAWTOOTHDOWN;
173 pShootEffect.eff.periodic.direction.type = SDL_HAPTIC_POLAR;
174 pShootEffect.eff.periodic.direction.dir[0] = 0;
175 pShootEffect.eff.periodic.length = 160;
176 pShootEffect.eff.periodic.period = 20;
177 pShootEffect.eff.periodic.magnitude = 0x7FFF;
178 pShootEffect.eff.periodic.fade_length = 120;
180 pShootEffect.id = SDL_HapticNewEffect(haptic, &pShootEffect.eff);
182 if (pShootEffect.id < 0) {
183 mprintf((" Fire primary effect failed to load:\n %s\n", SDL_GetError()));
185 pShootEffect.loaded = 1;
189 if (supported & SDL_HAPTIC_CONSTANT) {
191 memset(&pSecShootEffect, 0, sizeof(haptic_effect_t));
193 pSecShootEffect.eff.type = SDL_HAPTIC_CONSTANT;
194 pSecShootEffect.eff.constant.direction.type = SDL_HAPTIC_POLAR;
195 pSecShootEffect.eff.constant.direction.dir[0] = 0;
196 pSecShootEffect.eff.constant.length = 200;
197 pSecShootEffect.eff.constant.level = 0x7FFF;
198 pSecShootEffect.eff.constant.attack_length = 50;
199 pSecShootEffect.eff.constant.attack_level = 0x7FFF;
200 pSecShootEffect.eff.constant.fade_length = 100;
201 pSecShootEffect.eff.constant.fade_level = 1;
203 pSecShootEffect.id = SDL_HapticNewEffect(haptic, &pSecShootEffect.eff);
205 if (pSecShootEffect.id < 0) {
206 mprintf((" Fire secondary effect failed to load:\n %s\n", SDL_GetError()));
208 pSecShootEffect.loaded = 1;
212 if (supported & SDL_HAPTIC_SINE) {
214 memset(&pAfterburn1, 0, sizeof(haptic_effect_t));
216 pAfterburn1.eff.type = SDL_HAPTIC_SINE;
217 pAfterburn1.eff.periodic.direction.type = SDL_HAPTIC_POLAR;
218 pAfterburn1.eff.periodic.direction.dir[0] = 0;
219 pAfterburn1.eff.periodic.length = SDL_HAPTIC_INFINITY;
220 pAfterburn1.eff.periodic.period = 20;
221 pAfterburn1.eff.periodic.magnitude = 0x3332;
223 pAfterburn1.id = SDL_HapticNewEffect(haptic, &pAfterburn1.eff);
225 if (pAfterburn1.id < 0) {
226 mprintf((" Afterburn effect 1 failed to load:\n %s\n", SDL_GetError()));
228 pAfterburn1.loaded = 1;
232 memset(&pAfterburn2, 0, sizeof(haptic_effect_t));
234 pAfterburn2.eff.type = SDL_HAPTIC_SINE;
235 pAfterburn2.eff.periodic.direction.type = SDL_HAPTIC_POLAR;
236 pAfterburn2.eff.periodic.direction.dir[0] = 9000;
237 pAfterburn2.eff.periodic.length = 125;
238 pAfterburn2.eff.periodic.period = 100;
239 pAfterburn2.eff.periodic.magnitude = 0x1999;
241 pAfterburn2.id = SDL_HapticNewEffect(haptic, &pAfterburn2.eff);
243 if (pAfterburn2.id < 0) {
244 mprintf((" Afterburn effect 2 failed to load:\n %s\n", SDL_GetError()));
246 pAfterburn2.loaded = 1;
250 if (supported & SDL_HAPTIC_CONSTANT) {
252 memset(&pHitEffect1, 0, sizeof(haptic_effect_t));
254 pHitEffect1.eff.type = SDL_HAPTIC_CONSTANT;
255 pHitEffect1.eff.constant.direction.type = SDL_HAPTIC_POLAR;
256 pHitEffect1.eff.constant.direction.dir[0] = 0;
257 pHitEffect1.eff.constant.length = 300;
258 pHitEffect1.eff.constant.level = 0x7FFF;
259 pHitEffect1.eff.constant.attack_length = 0;
260 pHitEffect1.eff.constant.attack_level = 0x7FFF;
261 pHitEffect1.eff.constant.fade_length = 120;
262 pHitEffect1.eff.constant.fade_level = 1;
264 pHitEffect1.id = SDL_HapticNewEffect(haptic, &pHitEffect1.eff);
266 if (pHitEffect1.id < 0) {
267 mprintf((" Hit effect 1 failed to load:\n %s\n", SDL_GetError()));
269 pHitEffect1.loaded = 1;
273 if (supported & SDL_HAPTIC_SINE) {
275 memset(&pHitEffect2, 0, sizeof(haptic_effect_t));
277 pHitEffect2.eff.type = SDL_HAPTIC_SINE;
278 pHitEffect2.eff.periodic.direction.type = SDL_HAPTIC_POLAR;
279 pHitEffect2.eff.periodic.direction.dir[0] = 9000;
280 pHitEffect2.eff.periodic.length = 300;
281 pHitEffect2.eff.periodic.period = 100;
282 pHitEffect2.eff.periodic.magnitude = 0x7FFF;
283 pHitEffect2.eff.periodic.attack_length = 100;
284 pHitEffect2.eff.periodic.fade_length = 100;
286 pHitEffect2.id = SDL_HapticNewEffect(haptic, &pHitEffect2.eff);
288 if (pHitEffect2.id < 0) {
289 mprintf((" Hit effect 2 failed to load:\n %s\n", SDL_GetError()));
291 pHitEffect2.loaded = 1;
295 // if (supported & SDL_HAPTIC_SQUARE) {
296 if (supported & SDL_HAPTIC_TRIANGLE) {
298 memset(&pDock, 0, sizeof(haptic_effect_t));
300 // pDock.eff.type = SDL_HAPTIC_SQUARE;
301 pDock.eff.type = SDL_HAPTIC_TRIANGLE;
302 pDock.eff.periodic.direction.type = SDL_HAPTIC_POLAR;
303 pDock.eff.periodic.direction.dir[0] = 9000;
304 pDock.eff.periodic.length = 125;
305 pDock.eff.periodic.period = 100;
306 pDock.eff.periodic.magnitude = 0x3332;
308 pDock.id = SDL_HapticNewEffect(haptic, &pDock.eff);
311 mprintf((" Dock effect failed to load:\n %s\n", SDL_GetError()));
318 static bool joy_ff_can_play()
320 return (Joy_ff_enabled && Joy_ff_acquired);
323 static void joy_ff_update_effect(haptic_effect_t *eff, const char *name)
325 if ( !eff->loaded ) {
329 if ( SDL_HapticUpdateEffect(haptic, eff->id, &eff->eff) < 0 ) {
330 mprintf(("HapticERROR: Unable to update %s:\n %s\n", name, SDL_GetError()));
334 static void joy_ff_start_effect(haptic_effect_t *eff, const char *name)
336 if ( !eff->loaded ) {
340 // nprintf(("Joystick", "FF: Starting effect %s\n", name));
342 if ( SDL_HapticRunEffect(haptic, eff->id, 1) ) {
343 mprintf(("HapticERROR: Unable to run %s:\n %s\n", name, SDL_GetError()));
347 void joy_ff_stop_effects()
349 if ( !Joy_ff_enabled ) {
353 SDL_HapticStopAll(haptic);
356 void joy_ff_mission_init(vector v)
360 joy_ff_handling_scaler = (int) ((vm_vec_mag(&v) + 1.3f) * 5.0f);
362 Joy_ff_afterburning = 0;
364 joy_ff_adjust_handling(0);
366 if ( !joy_ff_effect_playing(&pSpring) ) {
367 joy_ff_start_effect(&pSpring, "Spring");
370 // reset afterburn effects to default values
372 pAfterburn1.eff.periodic.length = SDL_HAPTIC_INFINITY;
373 pAfterburn1.eff.periodic.period = 20;
374 pAfterburn1.eff.periodic.magnitude = 0x3332;
375 pAfterburn1.eff.periodic.attack_length = 0;
377 joy_ff_update_effect(&pAfterburn1, "pAfterburn1 (init)");
379 pAfterburn2.eff.periodic.length = SDL_HAPTIC_INFINITY;
380 pAfterburn2.eff.periodic.period = 100;
381 pAfterburn2.eff.periodic.magnitude = 0x1999;
382 pAfterburn2.eff.periodic.attack_length = 0;
384 joy_ff_update_effect(&pAfterburn2, "pAfterburn2 (init)");
386 // reset primary shoot effect to default values
388 pShootEffect.eff.periodic.direction.dir[0] = 0;
389 pShootEffect.eff.periodic.length = 160;
390 pShootEffect.eff.periodic.fade_length = 120;
392 joy_ff_update_effect(&pShootEffect, "pShootEffect (init)");
395 void joy_reacquire_ff()
397 if ( !Joy_ff_enabled ) {
401 if (Joy_ff_acquired) {
405 joy_ff_start_effect(&pSpring, "Spring");
410 void joy_unacquire_ff()
412 if ( !Joy_ff_enabled ) {
416 if ( !Joy_ff_acquired ) {
420 joy_ff_stop_effects();
425 void joy_ff_play_vector_effect(vector *v, float scaler)
430 if ( !joy_ff_can_play() ) {
434 // nprintf(("Joystick", "FF: vec = { %f, %f, %f } s = %f\n", v->xyz.x, v->xyz.y, v->xyz.z, scaler));
435 vm_vec_copy_scale(&vf, v, scaler);
439 if (vf.xyz.y + vf.xyz.z < 0.0f) {
440 y = -vm_vec_mag(&vf);
445 joy_ff_play_dir_effect(-x, -y);
448 void joy_ff_play_dir_effect(float x, float y)
453 if ( !joy_ff_can_play() ) {
457 // allow for at least one of the effects to work
458 if ( !pHitEffect1.loaded && !pHitEffect2.loaded ) {
462 if (joy_ff_effect_playing(&pHitEffect1) || joy_ff_effect_playing(&pHitEffect2)) {
463 nprintf(("Joystick", "FF: HitEffect already playing. Skipping\n"));
467 if (Joy_ff_directional_hit_effect_enabled) {
470 } else if (x < -8000.0f) {
476 } else if (y < -8000.0f) {
480 imag = (int) fl_sqrt(x * x + y * y);
485 degs = (float)atan2(x, y);
486 idegs = (int) (degs * 18000.0f / PI) + 90;
491 while (idegs >= 36000) {
495 if (pHitEffect1.loaded) {
496 pHitEffect1.eff.constant.direction.dir[0] = idegs;
497 pHitEffect1.eff.constant.level = (Sint16)(32767.0f * (imag / 10000.0f));
499 joy_ff_update_effect(&pHitEffect1, "pHitEffect1");
506 if (pHitEffect2.loaded) {
507 pHitEffect2.eff.periodic.direction.dir[0] = idegs;
508 pHitEffect2.eff.periodic.magnitude = (Sint16)(32767.0f * (imag / 10000.0f));
510 joy_ff_update_effect(&pHitEffect2, "pHitEffect2");
514 joy_ff_start_effect(&pHitEffect1, "HitEffect1");
515 joy_ff_start_effect(&pHitEffect2, "HitEffect2");
518 void joy_ff_play_primary_shoot(int gain)
520 if ( !joy_ff_can_play() ) {
524 if ( !pShootEffect.loaded && !Joy_rumble ) {
530 if (pShootEffect.loaded) {
531 SDL_HapticStopEffect(haptic, pShootEffect.id);
533 static int primary_ff_level = 10000;
535 if (gain != primary_ff_level) {
536 pShootEffect.eff.periodic.magnitude = (Sint16)(32767.0f * (gain / 10000.0f));
538 joy_ff_update_effect(&pShootEffect, "pShootEffect");
540 primary_ff_level = gain;
543 joy_ff_start_effect(&pShootEffect, "ShootEffect");
544 } else if (Joy_rumble) {
545 static int rumble_timeout = 1;
547 if ( timestamp_elapsed(rumble_timeout) ) {
548 SDL_HapticRumblePlay(haptic, gain / 10000.0f, 100);
550 rumble_timeout = timestamp(100);
555 void joy_ff_play_secondary_shoot(int gain)
557 if ( !joy_ff_can_play() ) {
561 if ( !pSecShootEffect.loaded && !Joy_rumble ) {
565 gain = gain * 100 + 2500;
569 if (pSecShootEffect.loaded) {
570 SDL_HapticStopEffect(haptic, pSecShootEffect.id);
572 static int secondary_ff_level = 10000;
574 if (gain != secondary_ff_level) {
575 pSecShootEffect.eff.constant.level = (Sint16)(32767.0f * (gain / 10000.0f));
576 pSecShootEffect.eff.constant.length = (150000 + gain * 25) / 1000;
578 joy_ff_update_effect(&pSecShootEffect, "pSecShootEffect");
580 secondary_ff_level = gain;
581 nprintf(("Joystick", "FF: Secondary force = 0x%04x\n", pSecShootEffect.eff.constant.level));
584 joy_ff_start_effect(&pSecShootEffect, "SecShootEffect");
585 } else if (Joy_rumble) {
586 static int rumble_timeout = 1;
588 if ( timestamp_elapsed(rumble_timeout) ) {
589 int duration = (150000 + gain * 25) / 1000;
591 SDL_HapticRumblePlay(haptic, gain / 10000.0f, duration);
593 rumble_timeout = timestamp(duration);
598 void joy_ff_adjust_handling(int speed)
603 if ( !joy_ff_can_play() ) {
607 if ( !pSpring.loaded ) {
611 static int last_speed = -1000;
613 if (speed == last_speed) {
619 v = speed * joy_ff_handling_scaler * 2 / 3;
620 // v += joy_ff_handling_scaler * joy_ff_handling_scaler * 6 / 7 + 250;
621 v += joy_ff_handling_scaler * 45 - 500;
625 coeff = (short)(32767.0f * (v / 10000.0f));
627 for (int i = 0; i < SDL_HapticNumAxes(haptic); i++) {
628 pSpring.eff.condition.right_coeff[i] = coeff;
629 pSpring.eff.condition.left_coeff[i] = coeff;
632 // nprintf(("Joystick", "FF: New handling force = 0x%04x\n", coeff));
634 joy_ff_update_effect(&pSpring, "pSpring");
637 static int joy_ff_effect_playing(haptic_effect_t *eff)
639 if ( !eff->loaded ) {
642 return (SDL_HapticGetEffectStatus(haptic, eff->id) > 0);
648 if ( !joy_ff_can_play() ) {
652 if ( !pDock.loaded ) {
656 SDL_HapticStopEffect(haptic, pDock.id);
658 pDock.eff.periodic.magnitude = 0x3332;
660 joy_ff_update_effect(&pDock, "pDock");
662 joy_ff_start_effect(&pDock, "Dock");
665 void joy_ff_play_reload_effect()
667 if ( !joy_ff_can_play() ) {
671 if ( !pDock.loaded ) {
675 SDL_HapticStopEffect(haptic, pDock.id);
677 pDock.eff.periodic.magnitude = 0x1999;
679 joy_ff_update_effect(&pDock, "pDock (reload)");
681 joy_ff_start_effect(&pDock, "Dock (Reload)");
684 void joy_ff_afterburn_on()
686 if ( !joy_ff_can_play() ) {
690 if (Joy_ff_afterburning) {
694 if ( !(pAfterburn1.loaded && pAfterburn2.loaded) ) {
698 SDL_HapticStopEffect(haptic, pAfterburn1.id);
700 pAfterburn1.eff.periodic.length = SDL_HAPTIC_INFINITY;
701 pAfterburn1.eff.periodic.magnitude = 0x3332;
703 joy_ff_update_effect(&pAfterburn1, "pAfterburn1");
705 SDL_HapticStopEffect(haptic, pAfterburn2.id);
707 pAfterburn2.eff.periodic.length = SDL_HAPTIC_INFINITY;
708 pAfterburn2.eff.periodic.magnitude = 0x1999;
710 joy_ff_update_effect(&pAfterburn2, "pAfterburn2");
712 joy_ff_start_effect(&pAfterburn1, "Afterburn1");
713 joy_ff_start_effect(&pAfterburn2, "Afterburn2");
715 // nprintf(("Joystick", "FF: Afterburn started\n"));
717 Joy_ff_afterburning = 1;
720 void joy_ff_afterburn_off()
722 if ( !joy_ff_can_play() ) {
726 if ( !Joy_ff_afterburning ) {
730 if (pAfterburn1.loaded) {
731 SDL_HapticStopEffect(haptic, pAfterburn1.id);
734 if (pAfterburn2.loaded) {
735 SDL_HapticStopEffect(haptic, pAfterburn2.id);
738 Joy_ff_afterburning = 0;
740 // nprintf(("Joystick", "FF: Afterburn stopped\n"));
743 void joy_ff_explode()
745 if ( !joy_ff_can_play() ) {
749 if (pAfterburn1.loaded) {
750 SDL_HapticStopEffect(haptic, pAfterburn1.id);
753 if (pAfterburn2.loaded) {
754 SDL_HapticStopEffect(haptic, pAfterburn2.id);
757 if (pShootEffect.loaded) {
758 SDL_HapticStopEffect(haptic, pShootEffect.id);
760 pShootEffect.eff.periodic.direction.dir[0] = 9000;
761 pShootEffect.eff.periodic.length = 500;
762 pShootEffect.eff.periodic.magnitude = 0x7FFF;
763 pShootEffect.eff.periodic.fade_length = 500;
765 joy_ff_update_effect(&pShootEffect, "pShootEffect (explode)");
767 joy_ff_start_effect(&pShootEffect, "ShootEffect (Explode)");
768 } else if (Joy_rumble) {
769 static int rumble_timeout = 1;
771 if ( timestamp_elapsed(rumble_timeout) ) {
772 SDL_HapticRumblePlay(haptic, 1.0f, 500);
774 rumble_timeout = timestamp(500);
778 Joy_ff_afterburning = 0;
781 void joy_ff_fly_by(int mag)
785 if ( !joy_ff_can_play() ) {
789 if (Joy_ff_afterburning) {
793 if ( !(pAfterburn1.loaded && pAfterburn2.loaded) ) {
797 gain = mag * 120 + 4000;
801 SDL_HapticStopEffect(haptic, pAfterburn1.id);
803 pAfterburn1.eff.periodic.length = (6000 * mag + 400000) / 1000;
804 pAfterburn1.eff.periodic.magnitude = (Sint16)(26212.0f * (gain / 10000.0f));
806 joy_ff_update_effect(&pAfterburn1, "pAfterburn1 (flyby)");
808 SDL_HapticStopEffect(haptic, pAfterburn2.id);
810 pAfterburn2.eff.periodic.length = (6000 * mag + 400000) / 1000;
811 pAfterburn2.eff.periodic.magnitude = (Sint16)(13106.0f * (gain / 10000.0f));
813 joy_ff_update_effect(&pAfterburn2, "pAfterburn2 (flyby)");
815 joy_ff_start_effect(&pAfterburn1, "Afterburn1 (Fly by)");
816 joy_ff_start_effect(&pAfterburn2, "Afterburn2 (Fly by)");
819 void joy_ff_deathroll()
821 if ( !joy_ff_can_play() ) {
825 if (pAfterburn1.loaded && pAfterburn2.loaded) {
826 SDL_HapticStopEffect(haptic, pAfterburn1.id);
828 pAfterburn1.eff.periodic.length = SDL_HAPTIC_INFINITY;
829 pAfterburn1.eff.periodic.period = 200;
830 pAfterburn1.eff.periodic.magnitude = 0x7FFF;
831 pAfterburn1.eff.periodic.attack_length = 200;
833 joy_ff_update_effect(&pAfterburn1, "pAfterburn1 (deathroll)");
835 SDL_HapticStopEffect(haptic, pAfterburn2.id);
837 pAfterburn2.eff.periodic.length = SDL_HAPTIC_INFINITY;
838 pAfterburn2.eff.periodic.period = 200;
839 pAfterburn2.eff.periodic.magnitude = 0x7FFF;
840 pAfterburn2.eff.periodic.attack_length = 200;
842 joy_ff_update_effect(&pAfterburn2, "pAfterburn2 (deathroll)");
844 joy_ff_start_effect(&pAfterburn1, "Afterburn1 (Death Roll)");
845 joy_ff_start_effect(&pAfterburn2, "Afterburn2 (Death Roll)");
847 Joy_ff_afterburning = 1;