cleanup + comments

This commit is contained in:
Alug committed 2024-10-01 15:22:22 +02:00
1 parent 67435ebf9e
commit d06b8ac398
3 files changed
+8 -19

No files matched your search

+1 -1
View File
@@ -2135,7 +2135,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
if (keepmusic && (leveltime < (starttime + TICRATE))) //why check for starttime? cause encore music Zzz...
return;
if (ignoremusicchanges && (leveltime > (starttime + TICRATE) && !fromlapexec)) // keep lap music intanct tho
if (cv_ignoremusicchanges.value && (leveltime > (starttime + TICRATE) && !fromlapexec)) // keep lap music intanct tho
return;
// console player only unless NOCLIMB is set
+7 -16
View File
@@ -123,7 +123,6 @@ consvar_t cv_keepmusic = {"keepmusic", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, N
consvar_t cv_skipintromusic = {"skipintromusic", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ignoremusicchanges = {"ignoremusicchanges", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
boolean ignoremusicchanges = false;
boolean keepmusic = false;
static void S_CheckEventMus(const char *newmus);
@@ -2204,9 +2203,6 @@ static const char *musicexception_list[16] = {
//always runs when musicchange gets invoked
static void S_CheckEventMus(const char *newmus)
{
//if (leveltime > (starttime + (TICRATE/2)))
//return;
skipmusic = false;
if (!cv_keepmusic.value)
@@ -2214,8 +2210,7 @@ static void S_CheckEventMus(const char *newmus)
return;
}
//this one compares map and encoremode instead of the music itself
//makes tunes work and stuff
for (int i = 0; i < 16; i++)
if (strcmp(music_name, musicexception_list[i]) == 0 || strcmp(newmus, musicexception_list[i]) == 0)
{
@@ -2228,7 +2223,8 @@ static void S_CheckEventMus(const char *newmus)
//CONS_Printf("newmus = %d\n", skipmusic);
}
//check if map and encoremode has changed
//this one compares map and encoremode instead of the music itself
//makes tunes work and stuff
void S_CheckMap(void)
{
if (!cv_keepmusic.value)
@@ -2276,9 +2272,6 @@ void S_InitMapMusic(void)
void S_StartMapMusic(void)
{
// need to be after race starts so "certain" maps don´t break Zzz...
ignoremusicchanges = cv_ignoremusicchanges.value && (leveltime > (starttime + (TICRATE/2)));
//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))
@@ -2289,20 +2282,18 @@ void S_StartMapMusic(void)
if (cv_skipintromusic.value)
{
if (leveltime == 0)
if (leveltime == 0) // dumb but i dont need this to be spammed honestly
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
if (leveltime == (starttime + (TICRATE/2)))
S_ShowMusicCredit();
return;
}
// The GO! sound stops the level start ambience
if (leveltime == starttime)
if (leveltime == starttime) // The GO! sound stops the level start ambience
S_StopMusic();
else if (leveltime < starttime) // SRB2Kart
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false);
// Plays the music after the starting countdown.
else if (leveltime == (starttime + (TICRATE/2)))
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.
{
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
S_ShowMusicCredit();
-2
View File
@@ -70,8 +70,6 @@ extern consvar_t cv_birdmusic;
extern consvar_t cv_keepmusic;
extern consvar_t cv_skipintromusic;
extern consvar_t cv_ignoremusicchanges;
extern boolean ignoremusicchanges;
extern boolean keepmusic;
extern consvar_t precachesound;