From 1f74aef9b5ecc980332e9f74ba53a5c289a50d6f Mon Sep 17 00:00:00 2001 From: Brad Harding Date: Mon, 2 Dec 2024 19:17:17 +1100 Subject: [PATCH] Minor tweaks --- src/c_cmds.c | 2 +- src/p_setup.c | 15 +++++++++++++++ src/p_setup.h | 1 + src/r_bsp.c | 2 +- src/st_stuff.c | 2 +- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/c_cmds.c b/src/c_cmds.c index 272ae15bb..5f2e61beb 100644 --- a/src/c_cmds.c +++ b/src/c_cmds.c @@ -727,7 +727,6 @@ consolecmd_t consolecmds[] = CMD_CHEAT(idspispopd, false), CCMD(if, "", "", null_func1, if_func2, true, IFCMDFORMAT, "Executes a string of " BOLDITALICS("commands") " if a " BOLDITALICS("CVAR") " equals a " BOLDITALICS("value") "."), - CMD_CHEAT(ijwtbha, false), CVAR_BOOL(infighting, "", "", bool_cvars_func1, bool_cvars_func2, CF_NONE, BOOLVALUEALIAS, "Toggles infighting amongst monsters once you die."), CCMD(infiniteammo, "", "", game_ccmd_func1, infiniteammo_func2, true, "[" BOLD("on") "|" BOLD("off") "]", @@ -955,6 +954,7 @@ consolecmd_t consolecmds[] = "Restarts the current map."), CCMD(resurrect, "", "", resurrect_func1, resurrect_func2, true, RESURRECTCMDFORMAT, "Resurrects the " BOLD("player") ", " BOLD("all") " monsters, or a type of " BOLDITALICS("monster") "."), + CMD_CHEAT(ryhan, false), CVAR_INT(s_channels, "", "", int_cvars_func1, int_cvars_func2, CF_NONE, NOVALUEALIAS, "The number of sound effects that can be played at the same time (" BOLD("8") " to " BOLD("64") ")."), CVAR_BOOL(s_lowermenumusic, "", "", bool_cvars_func1, bool_cvars_func2, CF_NONE, BOOLVALUEALIAS, diff --git a/src/p_setup.c b/src/p_setup.c index 2fb8bf6c1..07faa99fc 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -92,6 +92,7 @@ enum MCMD_INTERMUSIC, MCMD_INTERTEXT, MCMD_INTERTEXTSECRET, + MCMD_LABEL, MCMD_LEVELNAME, MCMD_LEVELPIC, MCMD_LIQUID, @@ -142,6 +143,7 @@ typedef struct int intermusic; char intertext[1024]; char intertextsecret[1024]; + char label[9]; int liquid[NUMLIQUIDS]; int mapinepisode; int music; @@ -277,6 +279,7 @@ static char *mapcmdnames[] = "INTERMUSIC", "INTERTEXT", "INTERTEXTSECRET", + "LABEL", "LEVELNAME", "LEVELPIC", "LIQUID", @@ -330,6 +333,7 @@ static int mapcmdids[] = MCMD_INTERMUSIC, MCMD_INTERTEXT, MCMD_INTERTEXTSECRET, + MCMD_LABEL, MCMD_LEVELNAME, MCMD_LEVELPIC, MCMD_LIQUID, @@ -3402,6 +3406,7 @@ static void P_InitMapInfo(void) mapinfo[i][j].intermusic = 0; mapinfo[i][j].intertext[0] = '\0'; mapinfo[i][j].intertextsecret[0] = '\0'; + mapinfo[i][j].label[0] = '\0'; for (int k = 0; k < NUMLIQUIDS; k++) { @@ -3847,6 +3852,11 @@ static bool P_ParseMapInfo(const char *scriptname) info->intermusic = W_CheckNumForName(sc_String); break; + case MCMD_LABEL: + SC_MustGetString(); + M_StringCopy(info->label, sc_String, sizeof(info->label)); + break; + case MCMD_INTERTEXTSECRET: { char buffer[1024] = ""; @@ -4230,6 +4240,11 @@ char *P_GetInterSecretText(const int ep, const int map) return mapinfo[ep][map].intertextsecret; } +char *P_GetLabel(const int ep, const int map) +{ + return mapinfo[ep][map].label; +} + bool P_GetMapEndBunny(const int ep, const int map) { return mapinfo[ep][map].endbunny; diff --git a/src/p_setup.h b/src/p_setup.h index 6edad9fee..131049fe1 100644 --- a/src/p_setup.h +++ b/src/p_setup.h @@ -79,6 +79,7 @@ char *P_GetInterBackrop(const int ep, const int map); int P_GetInterMusic(const int ep, const int map); char *P_GetInterText(const int ep, const int map); char *P_GetInterSecretText(const int ep, const int map); +char *P_GetLabel(const int ep, const int map); bool P_GetMapEndBunny(const int ep, const int map); bool P_GetMapEndCast(const int ep, const int map); bool P_GetMapEndGame(const int ep, const int map); diff --git a/src/r_bsp.c b/src/r_bsp.c index 346dfbe50..463061950 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -116,7 +116,7 @@ void R_ClearClipSegs(void) static void R_RecalcLineFlags(line_t *line) { bool twosided = line->flags & ML_TWOSIDED; - int c; + int c; line->r_validcount = gametime; diff --git a/src/st_stuff.c b/src/st_stuff.c index ee5615a46..ec21ade52 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -275,7 +275,7 @@ cheatseq_t cheat_clev = CHEAT("idclev", 0, false); cheatseq_t cheat_clev_xy = CHEAT("idclev", 2, false); cheatseq_t cheat_mypos = CHEAT("idmypos", 0, false); cheatseq_t cheat_amap = CHEAT("iddt", 0, false); -cheatseq_t cheat_buddha = CHEAT("ijwtbha", 0, false); +cheatseq_t cheat_buddha = CHEAT("ryhan", 0, false); cheatseq_t cheat_powerup[7] = {