fix some stuff

This commit is contained in:
Alug committed 2024-10-01 15:46:22 +02:00
1 parent 3a951576ee
commit 9abf2bca75
4 files changed
+15 -13

No files matched your search

+3 -3
View File
@@ -2132,10 +2132,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
break;
case 413: // Change music
if (keepmusic && (leveltime < (starttime + TICRATE))) //why check for starttime? cause encore music Zzz...
if (keepmusic && (leveltime <= MUSICSTARTTIME)) //why check for starttime? cause encore music Zzz...
return;
if (cv_ignoremusicchanges.value && (leveltime > (starttime + TICRATE) && !fromlapexec)) // keep lap music intanct tho
if (cv_ignoremusicchanges.value && (leveltime >= MUSICSTARTTIME) && !fromlapexec) // keep lap music intanct tho
return;
// console player only unless NOCLIMB is set
@@ -2221,7 +2221,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
INT32 sfxnum;
//dont play any funky sound intros that may interfere with the music
if (cv_skipintromusic.value && (leveltime < (starttime + (TICRATE/2))))
if (cv_skipintromusic.value && (leveltime < MUSICSTARTTIME))
return;
sfxnum = sides[line->sidenum[0]].toptexture; //P_AproxDistance(line->dx, line->dy)>>FRACBITS;
+3 -1
View File
@@ -742,7 +742,9 @@ void P_RestoreMusic(player_t *player)
if (P_EndingMusic(player))
return;
if (leveltime > (starttime + (TICRATE/2)))
if (leveltime < MUSICSTARTTIME)
S_StartMapMusic();
else // see also where time overs are handled - search for "lives = 2" in this file
{
INT32 wantedmus = 0; // 0 is level music, 1 is invincibility, 2 is grow
+8 -9
View File
@@ -2262,7 +2262,7 @@ void S_InitMapMusic(void)
if (cv_skipintromusic.value)
return;
if (leveltime < starttime) // SRB2Kart
if (leveltime < MUSICSTARTTIME) // SRB2Kart
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
//S_ChangeMusicEx((encoremode ? "estart" : "kstart"), 0, false, mapmusposition, 0, 0);
}
@@ -2270,8 +2270,7 @@ void S_InitMapMusic(void)
void S_StartMapMusic(void)
{
//no need to constantly run this after race has started
//but let it run atleast half a tic after map music started to let shit update lmao
if (leveltime > (starttime + TICRATE))
if (leveltime > MUSICSTARTTIME)
return;
if (keepmusic)
@@ -2279,18 +2278,18 @@ void S_StartMapMusic(void)
if (cv_skipintromusic.value)
{
if (leveltime == 0) // dumb but i dont need this to be spammed honestly
if (leveltime < starttime) // dumb but i dont need this to be spammed honestly
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
if (leveltime == (starttime + (TICRATE/2)))
if (leveltime == MUSICSTARTTIME)
S_ShowMusicCredit();
return;
}
if (leveltime == starttime) // The GO! sound stops the level start ambience
S_StopMusic();
else if (leveltime < starttime) // SRB2Kart
if (leveltime < starttime) // SRB2Kart
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); // yes this will be spammed otherwise encore and some stuff WILL overwrite it
else if (leveltime == (starttime + (TICRATE/2))) // Plays the music after the starting countdown.
else if (leveltime == starttime) // The GO! sound stops the level start ambience
S_StopMusic();
else if (leveltime == MUSICSTARTTIME) // Plays the music after the starting countdown.
{
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
S_ShowMusicCredit();
+1
View File
@@ -71,6 +71,7 @@ extern consvar_t cv_keepmusic;
extern consvar_t cv_skipintromusic;
extern consvar_t cv_ignoremusicchanges;
extern boolean keepmusic;
#define MUSICSTARTTIME (starttime + (TICRATE/2))
extern consvar_t precachesound;