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

Function zFrag_DefaultSoundUpdate

src/SB/Game/zShrapnel.cpp:817–852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

815}
816
817void zFrag_DefaultSoundUpdate(zFrag* frag, F32 param_2)
818{
819 zFragSoundAsset* sasset = frag->info.sound.fasset;
820
821 if (sasset->delay > 0.0001f)
822 {
823 zFragLoc_InitVec(&sasset->source, &frag->info.sound.location, frag->parent[0]);
824 }
825
826 frag->info.sound.soundID =
827 xSndPlay3D(sasset->assetID, 0.77f * sasset->volume, 0.0f, 0, 0, &frag->info.sound.location,
828 sasset->innerRadius, sasset->outerRadius, SND_CAT_GAME, 0.0f);
829
830 if (frag->prev != NULL)
831 {
832 frag->prev->next = frag->next;
833 }
834
835 if (frag->next != NULL)
836 {
837 frag->next->prev = frag->prev;
838 }
839
840 frag->next = sSoundList.next;
841 frag->prev = &sSoundList;
842
843 if (frag->prev != NULL)
844 {
845 frag->prev->next = frag;
846 }
847
848 if (frag->next != NULL)
849 {
850 frag->next->prev = frag;
851 }
852}
853
854void zFrag_SoundManager(F32 dt)
855{

Callers

nothing calls this directly

Calls 2

zFragLoc_InitVecFunction · 0.85
xSndPlay3DFunction · 0.70

Tested by

no test coverage detected