From b197dcdb1fccfb5eb2196c3faf79dee0ccf14405 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sat, 8 Jul 2017 11:41:20 +0100 Subject: [PATCH] A little bit of monitor love. * Rename "Unknown" options to "Mystery". * Make Random monitors work consistently in singleplayer if hacked/SOC'd in. --- src/d_netcmd.c | 6 +++--- src/m_menu.c | 4 ++-- src/p_enemy.c | 28 ++++++++++++++++++++++++++++ src/p_mobj.c | 10 +++++----- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index fb09718c1..9371727be 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -191,10 +191,10 @@ static CV_PossibleValue_t teamscramble_cons_t[] = {{0, "Off"}, {1, "Random"}, {2 static CV_PossibleValue_t startingliveslimit_cons_t[] = {{1, "MIN"}, {99, "MAX"}, {0, NULL}}; static CV_PossibleValue_t sleeping_cons_t[] = {{-1, "MIN"}, {1000/TICRATE, "MAX"}, {0, NULL}}; -static CV_PossibleValue_t competitionboxes_cons_t[] = {{0, "Normal"}, {1, "Unknown"}, //{2, "Teleport"}, +static CV_PossibleValue_t competitionboxes_cons_t[] = {{0, "Normal"}, {1, "Mystery"}, //{2, "Teleport"}, {3, "None"}, {0, NULL}}; -static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Unknown"}, {2, "Never changing"}, +static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Mystery"}, {2, "Unchanging"}, {3, "None"}, {0, NULL}}; static CV_PossibleValue_t chances_cons_t[] = {{0, "MIN"}, {9, "MAX"}, {0, NULL}}; @@ -216,7 +216,7 @@ consvar_t cv_startinglives = {"startinglives", "3", CV_NETVAR|CV_CHEAT, starting static CV_PossibleValue_t respawntime_cons_t[] = {{0, "MIN"}, {30, "MAX"}, {0, NULL}}; consvar_t cv_respawntime = {"respawndelay", "3", CV_NETVAR|CV_CHEAT, respawntime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_competitionboxes = {"competitionboxes", "Unknown", CV_NETVAR|CV_CHEAT, competitionboxes_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_competitionboxes = {"competitionboxes", "Mystery", CV_NETVAR|CV_CHEAT, competitionboxes_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; #ifdef SEENAMES static CV_PossibleValue_t seenames_cons_t[] = {{0, "Off"}, {1, "Colorless"}, {2, "Team"}, {3, "Ally/Foe"}, {0, NULL}}; diff --git a/src/m_menu.c b/src/m_menu.c index 6e3c3e9d4..fc59325a7 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1374,7 +1374,7 @@ static menuitem_t OP_ServerOptionsMenu[] = {IT_STRING | IT_CVAR | IT_CV_STRING, NULL, "Server name", &cv_servername, 7}, {IT_STRING | IT_CVAR, NULL, "Max Players", &cv_maxplayers, 21}, - {IT_STRING | IT_CVAR, NULL, "Allow Add-on Downloading", &cv_downloading, 26}, + {IT_STRING | IT_CVAR, NULL, "Allow Add-on Downloading", &cv_downloading, 26}, {IT_STRING | IT_CVAR, NULL, "Allow players to join", &cv_allownewplayer, 31}, #endif {IT_STRING | IT_CVAR, NULL, "Map progression", &cv_advancemap, 36}, @@ -1386,7 +1386,7 @@ static menuitem_t OP_ServerOptionsMenu[] = {IT_HEADER, NULL, "Items", NULL, 70}, {IT_STRING | IT_CVAR, NULL, "Item respawn delay", &cv_itemrespawntime, 76}, - {IT_STRING | IT_SUBMENU, NULL, "Unknown Item Monitor Toggles...", &OP_MonitorToggleDef, 81}, + {IT_STRING | IT_SUBMENU, NULL, "Mystery Item Monitor Toggles...", &OP_MonitorToggleDef, 81}, {IT_HEADER, NULL, "Cooperative", NULL, 90}, {IT_STRING | IT_CVAR, NULL, "Players required for exit", &cv_playersforexit, 96}, diff --git a/src/p_enemy.c b/src/p_enemy.c index f9cfde5f2..ee18985aa 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -841,6 +841,34 @@ static mobjtype_t P_DoRandomBoxChances(void) mobjtype_t spawnchance[256]; INT32 numchoices = 0, i = 0; + if (!(netgame || multiplayer)) + { + switch (P_RandomKey(10)) + { + case 0: + return MT_RING_ICON; + case 1: + return MT_SNEAKERS_ICON; + case 2: + return MT_INVULN_ICON; + case 3: + return MT_WHIRLWIND_ICON; + case 4: + return MT_ELEMENTAL_ICON; + case 5: + return MT_ATTRACT_ICON; + case 6: + return MT_FORCE_ICON; + case 7: + return MT_ARMAGEDDON_ICON; + case 8: + return MT_1UP_ICON; + case 9: + return MT_EGGMAN_ICON; + } + return MT_NULL; + } + #define QUESTIONBOXCHANCES(type, cvar) \ for (i = cvar.value; i; --i) spawnchance[numchoices++] = type QUESTIONBOXCHANCES(MT_RING_ICON, cv_superring); diff --git a/src/p_mobj.c b/src/p_mobj.c index 26f127f32..6836e3329 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9546,9 +9546,9 @@ void P_SpawnMapThing(mapthing_t *mthing) if (gametype == GT_COMPETITION || gametype == GT_RACE) { // Set powerup boxes to user settings for competition. - if (cv_competitionboxes.value == 1) // Random + if (cv_competitionboxes.value == 1) // Mystery i = MT_MYSTERY_BOX; - else if (cv_competitionboxes.value == 2) // Teleports + else if (cv_competitionboxes.value == 2) // Teleport i = MT_MIXUP_BOX; else if (cv_competitionboxes.value == 3) // None return; // Don't spawn! @@ -9557,12 +9557,12 @@ void P_SpawnMapThing(mapthing_t *mthing) // Set powerup boxes to user settings for other netplay modes else if (gametype != GT_COOP) { - if (cv_matchboxes.value == 1) // Random + if (cv_matchboxes.value == 1) // Mystery i = MT_MYSTERY_BOX; - else if (cv_matchboxes.value == 2) // Non-Random + else if (cv_matchboxes.value == 2) // Unchanging { if (i == MT_MYSTERY_BOX) - return; // don't spawn in Non-Random + return; // don't spawn mthing->options &= ~(MTF_AMBUSH|MTF_OBJECTSPECIAL); // no random respawning! } else if (cv_matchboxes.value == 3) // Don't spawn