readd music_resync_powerups_only

This commit is contained in:
Alug committed 2024-10-12 19:40:12 +02:00
1 parent c33afa4a3b
commit b6a84c1646
5 files changed
+8 -4

No files matched your search

+1
View File
@@ -2577,6 +2577,7 @@ static menuitem_t OP_AdvancedBirdMenu[] =
{IT_STRING | IT_CVAR, NULL, "Fade Back In While Respawning", &cv_respawnfademusicback, 40},
{IT_STRING | IT_CVAR, NULL, "Resync Threshold", &cv_music_resync_threshold, 60},
{IT_STRING | IT_CVAR, NULL, "Resync Special Music Only", &cv_music_resync_powerups_only, 70},
};
static const char* OP_AdvancedBirdTooltips[] =
+1 -3
View File
@@ -2179,9 +2179,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
mapmusflags |= MUSIC_FORCERESET;
mapmusposition = position;
if (cv_birdmusic.value)
mapmusresume = 0;
mapmusresume = 0;
S_ChangeMusicEx(mapmusname, mapmusflags, !(line->flags & ML_EFFECT4), position,
!(line->flags & ML_EFFECT2) ? prefadems : 0,
+2
View File
@@ -107,6 +107,7 @@ static CV_PossibleValue_t music_resync_threshold_cons_t[] = {
{0}
};
consvar_t cv_music_resync_threshold = {"music_resync_threshold", "0", CV_SAVE|CV_CALL, music_resync_threshold_cons_t, I_UpdateSongLagThreshold, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_music_resync_powerups_only = {"music_resync_powerups_only", "No", CV_SAVE|CV_CALL, CV_YesNo, I_UpdateSongLagThreshold, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_invincmusicfade = {"invincmusicfade", "300", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_growmusicfade = {"growmusicfade", "500", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -281,6 +282,7 @@ void S_RegisterSoundStuff(void)
CV_RegisterVar(&cv_pausemusic);
CV_RegisterVar(&cv_music_resync_threshold);
CV_RegisterVar(&cv_music_resync_powerups_only);
CV_RegisterVar(&cv_invincmusicfade);
CV_RegisterVar(&cv_growmusicfade);
+1
View File
@@ -54,6 +54,7 @@ extern consvar_t cv_amigatype;
//bird music stuff
extern consvar_t cv_music_resync_threshold;
extern consvar_t cv_music_resync_powerups_only;
extern consvar_t cv_invincmusicfade;
extern consvar_t cv_growmusicfade;
+3 -1
View File
@@ -93,6 +93,8 @@ static UINT16 SAMPLERATE = 44100;
/// ------------------------
UINT8 sound_started = false;
static UINT32 stutter_threshold_user;
static UINT32 stutter_threshold;
static Mix_Music *music;
@@ -1046,7 +1048,7 @@ void I_UpdateSongLagThreshold (void)
if (!cv_birdmusic.value)
return;
stutter_threshold = cv_music_resync_threshold.value/1000.0*(4*44100);
stutter_threshold = cv_music_resync_powerups_only.value ? 0 : (cv_music_resync_threshold.value/1000.0*(4*44100));
}
/// ------------------------