diff --git a/src/d_netcmd.c b/src/d_netcmd.c index b4e256d4d..309bdc36e 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -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); diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 0695d503d..c25b29d04 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -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; diff --git a/src/g_game.c b/src/g_game.c index b52a24cf7..2ea0fe63f 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -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; diff --git a/src/m_menu.c b/src/m_menu.c index dc888cb2d..796b17101 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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}, diff --git a/src/p_inter.c b/src/p_inter.c index cf3f29993..0e3d3f3d8 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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; } } diff --git a/src/p_user.c b/src/p_user.c index 66233568f..bd7b686dc 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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++) diff --git a/src/st_stuff.c b/src/st_stuff.c index f6dedf449..a9c563244 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -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.")); } }