clean bird music stuff again
we dont need to return everywhere but instead stuff can be mostly just set to 0 this also somewhat ensures stuff works after toggling without having to restart the game or map
This commit is contained in:
1 parent
9660128123
commit
0bfed31cae
3 files changed
+10
-17
No files matched your search
+5
-11
@@ -760,19 +760,13 @@ void P_RestoreMusic(player_t *player)
|
||||
if (G_RaceGametype() && player->laps >= (UINT8)(cv_numlaps.value - 1))
|
||||
S_SpeedMusic(1.2f);
|
||||
#endif
|
||||
if (cv_birdmusic.value)
|
||||
{
|
||||
if (mapmusresume && cv_resume.value)
|
||||
position = mapmusresume;
|
||||
else
|
||||
position = mapmusposition;
|
||||
|
||||
S_ChangeMusicEx(mapmusname, mapmusflags, true, position, 0, S_GetRestoreMusicFadeIn());
|
||||
S_ClearRestoreMusicFadeInCvar();
|
||||
}
|
||||
if (mapmusresume && cv_resume.value) // mapmusresume will be 0 anyways when birdmusic stuff is disabled
|
||||
position = mapmusresume;
|
||||
else
|
||||
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
|
||||
position = mapmusposition;
|
||||
|
||||
S_ChangeMusicEx(mapmusname, mapmusflags, true, position, 0, S_GetRestoreMusicFadeIn());
|
||||
S_ClearRestoreMusicFadeInCvar();
|
||||
mapmusresume = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -1848,8 +1848,10 @@ void S_StopMusic(void)
|
||||
|| demo.title) // SRB2Kart: Demos don't interrupt title screen music
|
||||
return;
|
||||
|
||||
if ((cv_birdmusic.value) && (strcasecmp(music_name, mapmusname) == 0))
|
||||
if (cv_birdmusic.value && (strcasecmp(music_name, mapmusname) == 0))
|
||||
mapmusresume = I_GetSongPosition();
|
||||
else
|
||||
mapmusresume = 0;
|
||||
|
||||
if (I_SongPaused())
|
||||
I_ResumeSong();
|
||||
@@ -1922,10 +1924,7 @@ void S_SetMusicVolume(INT32 digvolume, INT32 seqvolume)
|
||||
|
||||
void S_SetRestoreMusicFadeInCvar (consvar_t *cv)
|
||||
{
|
||||
if (!cv_birdmusic.value)
|
||||
return;
|
||||
|
||||
music_refade_cv = cv;
|
||||
music_refade_cv = cv_birdmusic.value ? cv : 0;
|
||||
}
|
||||
|
||||
int S_GetRestoreMusicFadeIn (void)
|
||||
|
||||
@@ -1045,7 +1045,7 @@ UINT32 I_GetSongPosition(void)
|
||||
// 8M: 1 | 8S: 2 | 16M: 2 | 16S: 4
|
||||
}
|
||||
|
||||
void I_UpdateSongLagThreshold (void)
|
||||
void I_UpdateSongLagThreshold(void)
|
||||
{
|
||||
stutter_threshold = cv_music_resync_powerups_only.value ? 0 : (cv_music_resync_threshold.value/1000.0*(4*44100));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user