@@ -2220,14 +2220,13 @@ void shipfx_do_lightning_arcs_frame( ship *shipp )
22202220 arc->endpoint_1 = v2;
22212221 arc->endpoint_2 = v3;
22222222 break ;
2223-
22242223 case 2 :
22252224 arc->endpoint_1 = v2;
22262225 arc->endpoint_2 = v4;
22272226 break ;
22282227
22292228 default :
2230- Int3 ( );
2229+ UNREACHABLE ( " Unhandled case %d for electrical arc creation in shipfx_do_lightning_arcs_frame()! " , n );
22312230 }
22322231
22332232 // determine what kind of arc to create
@@ -2244,30 +2243,30 @@ void shipfx_do_lightning_arcs_frame( ship *shipp )
22442243 } else if (arc->type == MARC_TYPE_DAMAGED || arc->type == MARC_TYPE_EMP) {
22452244 num_damage_arcs ++;
22462245 }
2246+ }
22472247
2248- // rotate v2 out of local coordinates into world.
2249- // Use v2 since it is used in every bolt. See above switch().
2250- vec3d snd_pos;
2251- vm_vec_unrotate (&snd_pos, &v2, &obj->orient );
2252- vm_vec_add2 (&snd_pos, &obj->pos );
2253-
2254- // Play a sound effect
2255- if ( lifetime > 750 ) {
2256- // 1.00 second effect
2257- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_05), &snd_pos, &View_position, obj->radius );
2258- } else if ( lifetime > 500 ) {
2259- // 0.75 second effect
2260- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_04), &snd_pos, &View_position, obj->radius );
2261- } else if ( lifetime > 250 ) {
2262- // 0.50 second effect
2263- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_03), &snd_pos, &View_position, obj->radius );
2264- } else if ( lifetime > 100 ) {
2265- // 0.25 second effect
2266- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_02), &snd_pos, &View_position, obj->radius );
2267- } else {
2268- // 0.10 second effect
2269- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_01), &snd_pos, &View_position, obj->radius );
2270- }
2248+ // rotate v2 out of local coordinates into world.
2249+ // Use v2 since it is used in every bolt. See above switch().
2250+ vec3d snd_pos;
2251+ vm_vec_unrotate (&snd_pos, &v2, &obj->orient );
2252+ vm_vec_add2 (&snd_pos, &obj->pos );
2253+
2254+ // Play a sound effect
2255+ if ( lifetime > 750 ) {
2256+ // 1.00 second effect
2257+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_05), &snd_pos, &View_position, obj->radius );
2258+ } else if ( lifetime > 500 ) {
2259+ // 0.75 second effect
2260+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_04), &snd_pos, &View_position, obj->radius );
2261+ } else if ( lifetime > 250 ) {
2262+ // 0.50 second effect
2263+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_03), &snd_pos, &View_position, obj->radius );
2264+ } else if ( lifetime > 100 ) {
2265+ // 0.25 second effect
2266+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_02), &snd_pos, &View_position, obj->radius );
2267+ } else {
2268+ // 0.10 second effect
2269+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_01), &snd_pos, &View_position, obj->radius );
22712270 }
22722271 }
22732272
0 commit comments