mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
A little bit of monitor love.
* Rename "Unknown" options to "Mystery". * Make Random monitors work consistently in singleplayer if hacked/SOC'd in.
This commit is contained in:
parent
5cc1b0dcd0
commit
b197dcdb1f
4 changed files with 38 additions and 10 deletions
|
@ -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}};
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -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);
|
||||
|
|
10
src/p_mobj.c
10
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
|
||||
|
|
Loading…
Reference in a new issue