Skip to content

Commit b98b8f2

Browse files
authored
Merge pull request #6324 from Goober5000/fotg_sound_fix
fix deletion of looping sounds
2 parents d68b18d + 28659bb commit b98b8f2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

code/ship/ship.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10360,11 +10360,10 @@ void update_firing_sounds(object* objp, ship* shipp)
1036010360
end_snd_played = wip->end_firing_snd;
1036110361
}
1036210362

10363-
if (wip->loop_firing_snd.isValid()) {
10363+
if (swp->firing_loop_sounds[i] >= 0) {
1036410364
obj_snd_delete(objp, swp->firing_loop_sounds[i]);
10365-
swp->firing_loop_sounds[i] = -1;
10366-
} else
10367-
swp->firing_loop_sounds[i] = -1;
10365+
}
10366+
swp->firing_loop_sounds[i] = -1;
1036810367
}
1036910368
}
1037010369
}

0 commit comments

Comments
 (0)