MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Music_DynamicDataAvailable

Function Music_DynamicDataAvailable

code/client/snd_music.cpp:662–678  ·  view source on GitHub ↗

where label is (eg) "kejim_base"...

Source from the content-addressed store, hash-verified

660// where label is (eg) "kejim_base"...
661//
662qboolean Music_DynamicDataAvailable(const char *psDynamicMusicLabel)
663{
664 char sLevelName[MAX_QPATH];
665 Q_strncpyz(sLevelName,COM_SkipPath( const_cast<char*>( (psDynamicMusicLabel&&psDynamicMusicLabel[0])?psDynamicMusicLabel:gsLevelNameFromServer.c_str() ) ),sizeof(sLevelName));
666 Q_strlwr(sLevelName);
667
668 if (strlen(sLevelName)) // avoid error messages when there's no music waiting to be played and we try and restart it...
669 {
670 if (Music_ParseLeveldata(sLevelName))
671 {
672 return (qboolean)(Music_GetBaseMusicFile(eBGRNDTRACK_EXPLORE) &&
673 Music_GetBaseMusicFile(eBGRNDTRACK_ACTION));
674 }
675 }
676
677 return qfalse;
678}
679
680const char *Music_GetFileNameForState( MusicState_e eMusicState)
681{

Callers 1

S_StartBackgroundTrackFunction · 0.70

Calls 6

Q_strncpyzFunction · 0.85
Q_strlwrFunction · 0.85
Music_ParseLeveldataFunction · 0.70
Music_GetBaseMusicFileFunction · 0.70
COM_SkipPathFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected