mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-26 13:01:52 +00:00
Tiny prep work for splitscreen spectate/join to implement later
This commit is contained in:
parent
55b9489af0
commit
a64f97da7b
4 changed files with 26 additions and 8 deletions
|
|
@ -212,6 +212,7 @@ typedef enum
|
|||
mpause_spectate,
|
||||
mpause_entergame,
|
||||
mpause_canceljoin,
|
||||
mpause_spectatemenu,
|
||||
mpause_psetup,
|
||||
mpause_options,
|
||||
|
||||
|
|
@ -444,6 +445,9 @@ void M_QuitPauseMenu(void);
|
|||
boolean M_PauseInputs(INT32 ch);
|
||||
void M_PauseTick(void);
|
||||
|
||||
extern consvar_t cv_dummymenuplayer;
|
||||
extern consvar_t cv_dummyspectator;
|
||||
|
||||
// Bunch of funny functions for the pause menu...~
|
||||
void M_ConfirmSpectate(INT32 choice); // Spectate confirm when you're alone
|
||||
void M_ConfirmEnterGame(INT32 choice); // Enter game confirm when you're alone
|
||||
|
|
|
|||
|
|
@ -325,6 +325,9 @@ menuitem_t PAUSE_Main[] =
|
|||
{IT_STRING | IT_CALL, "CANCEL JOIN", "M_ICOSPC",
|
||||
NULL, M_ConfirmSpectate, 0, 0},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, "JOIN OR SPECTATE", "M_ICOENT",
|
||||
NULL, NULL, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CALL, "PLAYER SETUP", "M_ICOCHR",
|
||||
NULL, NULL, 0, 0},
|
||||
|
||||
|
|
|
|||
|
|
@ -1711,7 +1711,7 @@ void M_DrawPause(void)
|
|||
{
|
||||
char c = currentMenu->menuitems[itemOn].text[j];
|
||||
|
||||
if (c == ' ')
|
||||
if (c == ' ' && !sok)
|
||||
{
|
||||
sok = true;
|
||||
j++;
|
||||
|
|
|
|||
|
|
@ -166,13 +166,15 @@ static CV_PossibleValue_t dummyscramble_cons_t[] = {{0, "Random"}, {1, "Points"}
|
|||
static CV_PossibleValue_t dummystaff_cons_t[] = {{0, "MIN"}, {100, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t dummygametype_cons_t[] = {{0, "Race"}, {1, "Battle"}, {0, NULL}};
|
||||
|
||||
static consvar_t cv_dummymenuplayer = CVAR_INIT ("dummymenuplayer", "P1", CV_HIDDEN|CV_CALL, dummymenuplayer_cons_t, Dummymenuplayer_OnChange);
|
||||
//static consvar_t cv_dummymenuplayer = CVAR_INIT ("dummymenuplayer", "P1", CV_HIDDEN|CV_CALL, dummymenuplayer_cons_t, Dummymenuplayer_OnChange);
|
||||
static consvar_t cv_dummyteam = CVAR_INIT ("dummyteam", "Spectator", CV_HIDDEN, dummyteam_cons_t, NULL);
|
||||
static consvar_t cv_dummyspectate = CVAR_INIT ("dummyspectate", "Spectator", CV_HIDDEN, dummyspectate_cons_t, NULL);
|
||||
//static cv_dummyspectate = CVAR_INITconsvar_t ("dummyspectate", "Spectator", CV_HIDDEN, dummyspectate_cons_t, NULL);
|
||||
static consvar_t cv_dummyscramble = CVAR_INIT ("dummyscramble", "Random", CV_HIDDEN, dummyscramble_cons_t, NULL);
|
||||
static consvar_t cv_dummystaff = CVAR_INIT ("dummystaff", "0", CV_HIDDEN|CV_CALL, dummystaff_cons_t, Dummystaff_OnChange);
|
||||
consvar_t cv_dummygametype = CVAR_INIT ("dummygametype", "Race", CV_HIDDEN, dummygametype_cons_t, NULL);
|
||||
consvar_t cv_dummyip = CVAR_INIT ("dummyip", "", CV_HIDDEN, NULL, NULL);
|
||||
consvar_t cv_dummymenuplayer = CVAR_INIT ("dummymenuplayer", "P1", CV_HIDDEN|CV_CALL, dummymenuplayer_cons_t, Dummymenuplayer_OnChange);
|
||||
consvar_t cv_dummyspectate = CVAR_INIT ("dummyspectate", "Spectator", CV_HIDDEN, dummyspectate_cons_t, NULL);
|
||||
|
||||
// ==========================================================================
|
||||
// CVAR ONCHANGE EVENTS GO HERE
|
||||
|
|
@ -2902,8 +2904,11 @@ void M_OpenPauseMenu(void)
|
|||
PAUSE_Main[mpause_spectate].status = IT_DISABLED;
|
||||
PAUSE_Main[mpause_entergame].status = IT_DISABLED;
|
||||
PAUSE_Main[mpause_canceljoin].status = IT_DISABLED;
|
||||
PAUSE_Main[mpause_spectatemenu].status = IT_DISABLED;
|
||||
PAUSE_Main[mpause_psetup].status = IT_DISABLED;
|
||||
|
||||
Dummymenuplayer_OnChange(); // Make sure the consvar is within bounds of the amount of splitscreen players we have.
|
||||
|
||||
if (!singleplayermode && (server || IsPlayerAdmin(consoleplayer)))
|
||||
{
|
||||
PAUSE_Main[mpause_switchmap].status = IT_STRING | IT_SUBMENU;
|
||||
|
|
@ -2915,12 +2920,18 @@ void M_OpenPauseMenu(void)
|
|||
|
||||
if (G_GametypeHasSpectators())
|
||||
{
|
||||
if (!players[consoleplayer].spectator)
|
||||
PAUSE_Main[mpause_spectate].status = IT_STRING | IT_CALL;
|
||||
else if (players[consoleplayer].pflags & PF_WANTSTOJOIN)
|
||||
PAUSE_Main[mpause_canceljoin].status = IT_STRING | IT_CALL;
|
||||
|
||||
if (splitscreen)
|
||||
PAUSE_Main[mpause_spectatemenu].status = IT_STRING|IT_SUBMENU;
|
||||
else
|
||||
PAUSE_Main[mpause_entergame].status = IT_STRING | IT_CALL;
|
||||
{
|
||||
if (!players[consoleplayer].spectator)
|
||||
PAUSE_Main[mpause_spectate].status = IT_STRING | IT_CALL;
|
||||
else if (players[consoleplayer].pflags & PF_WANTSTOJOIN)
|
||||
PAUSE_Main[mpause_canceljoin].status = IT_STRING | IT_CALL;
|
||||
else
|
||||
PAUSE_Main[mpause_entergame].status = IT_STRING | IT_CALL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue