MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / play_sound

Function play_sound

src/SB/Game/zEntPlayerBungeeState.cpp:195–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193 };
194
195 static void play_sound(sound_enum which, F32 delay)
196 {
197 const sound_group& sg = sound_groups[which];
198 if (sg.first > sg.last)
199 {
200 return;
201 }
202 if (sg.first == sg.last)
203 {
204 if (sg.streamed)
205 {
206 zEntPlayer_SNDPlayStreamRandom((_tagePlayerStreamSnd)sg.first,
207 (_tagePlayerStreamSnd)sg.last, delay);
208 }
209 else
210 {
211 zEntPlayer_SNDPlay((_tagePlayerSnd)sg.first, delay);
212 }
213 }
214 else
215 {
216 if (sg.streamed)
217 {
218 zEntPlayer_SNDPlayStreamRandom((_tagePlayerStreamSnd)sg.first,
219 (_tagePlayerStreamSnd)sg.last, delay);
220 }
221 else
222 {
223 zEntPlayer_SNDPlayRandom((_tagePlayerSnd)sg.first, (_tagePlayerSnd)sg.last,
224 delay);
225 }
226 }
227 }
228 static void stop_sound(S32 which)
229 {
230 const sound_group& sg = sound_groups[which];

Callers 2

check_anim_hit_to_deathFunction · 0.70
detach_updateMethod · 0.70

Calls 3

zEntPlayer_SNDPlayFunction · 0.85
zEntPlayer_SNDPlayRandomFunction · 0.70

Tested by

no test coverage detected