@@ -2214,14 +2214,13 @@ void shipfx_do_lightning_arcs_frame( ship *shipp )
22142214 arc->endpoint_1 = v2;
22152215 arc->endpoint_2 = v3;
22162216 break ;
2217-
22182217 case 2 :
22192218 arc->endpoint_1 = v2;
22202219 arc->endpoint_2 = v4;
22212220 break ;
22222221
22232222 default :
2224- Int3 ( );
2223+ UNREACHABLE ( " Unhandled case %d for electrical arc creation in shipfx_do_lightning_arcs_frame()! " , n );
22252224 }
22262225
22272226 // determine what kind of arc to create
@@ -2238,30 +2237,30 @@ void shipfx_do_lightning_arcs_frame( ship *shipp )
22382237 } else if (arc->type == MARC_TYPE_DAMAGED || arc->type == MARC_TYPE_EMP ) {
22392238 num_damage_arcs ++;
22402239 }
2240+ }
22412241
2242- // rotate v2 out of local coordinates into world.
2243- // Use v2 since it is used in every bolt. See above switch().
2244- vec3d snd_pos;
2245- vm_vec_unrotate (&snd_pos, &v2, &obj->orient );
2246- vm_vec_add2 (&snd_pos, &obj->pos );
2247-
2248- // Play a sound effect
2249- if ( lifetime > 750 ) {
2250- // 1.00 second effect
2251- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_05 ), &snd_pos, &View_position, obj->radius );
2252- } else if ( lifetime > 500 ) {
2253- // 0.75 second effect
2254- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_04 ), &snd_pos, &View_position, obj->radius );
2255- } else if ( lifetime > 250 ) {
2256- // 0.50 second effect
2257- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_03 ), &snd_pos, &View_position, obj->radius );
2258- } else if ( lifetime > 100 ) {
2259- // 0.25 second effect
2260- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_02 ), &snd_pos, &View_position, obj->radius );
2261- } else {
2262- // 0.10 second effect
2263- snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_01 ), &snd_pos, &View_position, obj->radius );
2264- }
2242+ // rotate v2 out of local coordinates into world.
2243+ // Use v2 since it is used in every bolt. See above switch().
2244+ vec3d snd_pos;
2245+ vm_vec_unrotate (&snd_pos, &v2, &obj->orient );
2246+ vm_vec_add2 (&snd_pos, &obj->pos );
2247+
2248+ // Play a sound effect
2249+ if ( lifetime > 750 ) {
2250+ // 1.00 second effect
2251+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_05 ), &snd_pos, &View_position, obj->radius );
2252+ } else if ( lifetime > 500 ) {
2253+ // 0.75 second effect
2254+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_04 ), &snd_pos, &View_position, obj->radius );
2255+ } else if ( lifetime > 250 ) {
2256+ // 0.50 second effect
2257+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_03 ), &snd_pos, &View_position, obj->radius );
2258+ } else if ( lifetime > 100 ) {
2259+ // 0.25 second effect
2260+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_02 ), &snd_pos, &View_position, obj->radius );
2261+ } else {
2262+ // 0.10 second effect
2263+ snd_play_3d ( gamesnd_get_game_sound (GameSounds::DEBRIS_ARC_01 ), &snd_pos, &View_position, obj->radius );
22652264 }
22662265 }
22672266
0 commit comments