mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-26 04:30:55 +00:00
* Combine cv_sharedstarposts and cv_respawntype into cv_playstyle (Individual, Sharing, Together).
* Put steallives on menu.
This commit is contained in:
parent
4239036cec
commit
964df31ee5
7 changed files with 13 additions and 16 deletions
|
@ -349,12 +349,10 @@ consvar_t cv_maxping = {"maxping", "0", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NUL
|
|||
static CV_PossibleValue_t inttime_cons_t[] = {{0, "MIN"}, {3600, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_inttime = {"inttime", "10", CV_NETVAR, inttime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_sharedstarposts = {"sharedstarposts", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t playstyle_cons_t[] = {{0, "Individual"}, {1, "Sharing"}, {2, "Together"}, {0, NULL}};
|
||||
consvar_t cv_playstyle = {"playstyle", "Together", CV_NETVAR|CV_CHEAT, playstyle_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t respawntype_cons_t[] = {{0, "Request"}, {1, "Starpost"}, {0, NULL}};
|
||||
consvar_t cv_respawntype = {"respawntype", "Starpost", CV_NETVAR|CV_CHEAT, respawntype_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_steallives = {"steallives", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_steallives = {"steallives", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t advancemap_cons_t[] = {{0, "Off"}, {1, "Next"}, {2, "Random"}, {0, NULL}};
|
||||
consvar_t cv_advancemap = {"advancemap", "Next", CV_NETVAR, advancemap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -514,8 +512,7 @@ void D_RegisterServerCommands(void)
|
|||
CV_RegisterVar(&cv_forceskin);
|
||||
CV_RegisterVar(&cv_downloading);
|
||||
|
||||
CV_RegisterVar(&cv_sharedstarposts);
|
||||
CV_RegisterVar(&cv_respawntype);
|
||||
CV_RegisterVar(&cv_playstyle);
|
||||
CV_RegisterVar(&cv_steallives);
|
||||
|
||||
CV_RegisterVar(&cv_specialrings);
|
||||
|
|
|
@ -89,7 +89,7 @@ extern consvar_t cv_recycler;
|
|||
|
||||
extern consvar_t cv_itemfinder;
|
||||
|
||||
extern consvar_t cv_inttime, cv_sharedstarposts, cv_respawntype, cv_steallives, cv_advancemap, cv_playersforexit;
|
||||
extern consvar_t cv_inttime, cv_playstyle, cv_steallives, cv_advancemap, cv_playersforexit;
|
||||
extern consvar_t cv_overtime;
|
||||
extern consvar_t cv_startinglives;
|
||||
|
||||
|
|
|
@ -2592,7 +2592,7 @@ void G_DoReborn(INT32 playernum)
|
|||
// respawn at the start
|
||||
mobj_t *oldmo = NULL;
|
||||
|
||||
if (gametype == GT_COOP && (netgame || multiplayer) && cv_respawntype.value == 1)
|
||||
if (gametype == GT_COOP && (netgame || multiplayer) && cv_playstyle.value == 2)
|
||||
{
|
||||
INT32 i;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
|
@ -2702,7 +2702,7 @@ void G_AddPlayer(INT32 playernum)
|
|||
if (!players->exiting)
|
||||
notexiting++;
|
||||
|
||||
if (!(cv_sharedstarposts.value && (gametype == GT_COOP) && (p->starpostnum < players[i].starpostnum)))
|
||||
if (!(cv_playstyle.value && (gametype == GT_COOP) && (p->starpostnum < players[i].starpostnum)))
|
||||
continue;
|
||||
|
||||
p->starposttime = players[i].starposttime;
|
||||
|
|
|
@ -1390,8 +1390,8 @@ static menuitem_t OP_ServerOptionsMenu[] =
|
|||
|
||||
{IT_HEADER, NULL, "Cooperative", NULL, 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Players required for exit", &cv_playersforexit, 96},
|
||||
{IT_STRING | IT_CVAR, NULL, "Respawn mechanic", &cv_respawntype, 101},
|
||||
{IT_STRING | IT_CVAR, NULL, "Shared starposts", &cv_sharedstarposts, 106},
|
||||
{IT_STRING | IT_CVAR, NULL, "Play style", &cv_playstyle, 101},
|
||||
{IT_STRING | IT_CVAR, NULL, "Steal lives on game over", &cv_steallives, 106},
|
||||
|
||||
{IT_HEADER, NULL, "Race, Competition", NULL, 115},
|
||||
{IT_STRING | IT_CVAR, NULL, "Level completion countdown", &cv_countdowntime, 121},
|
||||
|
|
|
@ -1293,7 +1293,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
if (player->starpostnum >= special->health)
|
||||
return; // Already hit this post
|
||||
|
||||
if (cv_sharedstarposts.value && gametype == GT_COOP && (netgame || multiplayer))
|
||||
if (cv_playstyle.value && gametype == GT_COOP && (netgame || multiplayer))
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
@ -1309,7 +1309,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
players[i].starpostangle = special->angle;
|
||||
players[i].starpostnum = special->health;
|
||||
|
||||
if (cv_respawntype.value == 1 && (P_GetLives(&players[i]) || players[i].lives > 0) && players[i].playerstate == PST_DEAD)
|
||||
if (cv_playstyle.value == 2 && (P_GetLives(&players[i]) || players[i].lives > 0) && players[i].playerstate == PST_DEAD)
|
||||
players[i].playerstate = PST_REBORN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8194,7 +8194,7 @@ static void P_DeathThink(player_t *player)
|
|||
player->playerstate = PST_REBORN;
|
||||
else if ((player->lives > 0 || j != MAXPLAYERS) && !G_IsSpecialStage(gamemap)) // Don't allow "click to respawn" in special stages!
|
||||
{
|
||||
if (gametype == GT_COOP && (netgame || multiplayer) && cv_respawntype.value == 1) // Shamelessly lifted from TD. Thanks, Sryder!
|
||||
if (gametype == GT_COOP && (netgame || multiplayer) && cv_playstyle.value == 2) // Shamelessly lifted from TD. Thanks, Sryder!
|
||||
{
|
||||
INT32 i, lastdeadplayer = -1, deadtimercheck = INT32_MAX;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
|
|
|
@ -1873,7 +1873,7 @@ static void ST_overlayDrawer(void)
|
|||
}
|
||||
|
||||
if (i != MAXPLAYERS)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(BASEVIDHEIGHT/2 + (SHORT(p->height)/2)) + 15, 0, M_GetText("You'll steal a life on respawn."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(BASEVIDHEIGHT/2 + (SHORT(p->height)/2)) + 14, 0, M_GetText("You'll steal a life on respawn."));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue