mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-31 05:20:51 +00:00
Change dummysplitplayers into splitplayers, unhide it, and set it when joining and not just hosting
Silly oversight
This commit is contained in:
parent
9cf379f091
commit
a4f3d4867d
4 changed files with 17 additions and 11 deletions
|
@ -2377,8 +2377,11 @@ static void Command_connect(void)
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("There is no network driver\n"));
|
CONS_Alert(CONS_ERROR, M_GetText("There is no network driver\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
splitscreen = 3; // TEMPORARY TESTING MEASURE
|
if (splitscreen != cv_splitplayers.value-1)
|
||||||
SplitScreen_OnChange();
|
{
|
||||||
|
splitscreen = cv_splitplayers.value-1;
|
||||||
|
SplitScreen_OnChange();
|
||||||
|
}
|
||||||
botingame = false;
|
botingame = false;
|
||||||
botskin = 0;
|
botskin = 0;
|
||||||
CL_ConnectToServer(viams);
|
CL_ConnectToServer(viams);
|
||||||
|
|
|
@ -759,6 +759,8 @@ void D_RegisterClientCommands(void)
|
||||||
CV_RegisterVar(&cv_playername4);
|
CV_RegisterVar(&cv_playername4);
|
||||||
CV_RegisterVar(&cv_playercolor4);
|
CV_RegisterVar(&cv_playercolor4);
|
||||||
CV_RegisterVar(&cv_skin4);
|
CV_RegisterVar(&cv_skin4);
|
||||||
|
// preferred number of players
|
||||||
|
CV_RegisterVar(&cv_splitplayers);
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
CV_RegisterVar(&cv_seenames);
|
CV_RegisterVar(&cv_seenames);
|
||||||
|
|
|
@ -62,6 +62,7 @@ extern consvar_t cv_turnaxis2,cv_moveaxis2,cv_brakeaxis2,cv_aimaxis2,cv_lookaxis
|
||||||
extern consvar_t cv_turnaxis3,cv_moveaxis3,cv_brakeaxis3,cv_aimaxis3,cv_lookaxis3,cv_fireaxis3,cv_driftaxis3;
|
extern consvar_t cv_turnaxis3,cv_moveaxis3,cv_brakeaxis3,cv_aimaxis3,cv_lookaxis3,cv_fireaxis3,cv_driftaxis3;
|
||||||
extern consvar_t cv_turnaxis4,cv_moveaxis4,cv_brakeaxis4,cv_aimaxis4,cv_lookaxis4,cv_fireaxis4,cv_driftaxis4;
|
extern consvar_t cv_turnaxis4,cv_moveaxis4,cv_brakeaxis4,cv_aimaxis4,cv_lookaxis4,cv_fireaxis4,cv_driftaxis4;
|
||||||
extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff;
|
extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff;
|
||||||
|
extern consvar_t cv_splitplayers;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
18
src/m_menu.c
18
src/m_menu.c
|
@ -463,9 +463,9 @@ consvar_t cv_ghost_staff = {"ghost_staff", "Show", CV_SAVE, ghost2_cons_
|
||||||
//todo: add a way to use non-console variables in the menu
|
//todo: add a way to use non-console variables in the menu
|
||||||
// or make these consvars legitimate like color or skin.
|
// or make these consvars legitimate like color or skin.
|
||||||
#ifndef NOFOURPLAYER
|
#ifndef NOFOURPLAYER
|
||||||
static void Dummysplitplayers_OnChange(void);
|
static void Splitplayers_OnChange(void);
|
||||||
static CV_PossibleValue_t dummysplitplayers_cons_t[] = {{1, "One"}, {2, "Two"}, {3, "Three"}, {4, "Four"}, {0, NULL}};
|
CV_PossibleValue_t splitplayers_cons_t[] = {{1, "One"}, {2, "Two"}, {3, "Three"}, {4, "Four"}, {0, NULL}};
|
||||||
static consvar_t cv_dummysplitplayers = {"dummysplitplayers", "One", CV_HIDEN|CV_CALL, dummysplitplayers_cons_t, Dummysplitplayers_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_splitplayers = {"splitplayers", "One", CV_CALL, splitplayers_cons_t, Splitplayers_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static CV_PossibleValue_t dummyteam_cons_t[] = {{0, "Spectator"}, {1, "Red"}, {2, "Blue"}, {0, NULL}};
|
static CV_PossibleValue_t dummyteam_cons_t[] = {{0, "Spectator"}, {1, "Red"}, {2, "Blue"}, {0, NULL}};
|
||||||
|
@ -949,7 +949,7 @@ menuitem_t PlayerMenu[32] =
|
||||||
static menuitem_t MP_SetPlayersMenu[] =
|
static menuitem_t MP_SetPlayersMenu[] =
|
||||||
{
|
{
|
||||||
#ifndef NOFOURPLAYER
|
#ifndef NOFOURPLAYER
|
||||||
{IT_STRING|IT_CVAR, NULL, "Number of players", &cv_dummysplitplayers, 10},
|
{IT_STRING|IT_CVAR, NULL, "Number of players", &cv_splitplayers, 10},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NOFOURPLAYER
|
#ifdef NOFOURPLAYER
|
||||||
|
@ -1002,13 +1002,13 @@ static menuitem_t MP_OfflineServerMenu[] =
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef NOFOURPLAYER
|
#ifndef NOFOURPLAYER
|
||||||
static void Dummysplitplayers_OnChange(void)
|
static void Splitplayers_OnChange(void)
|
||||||
{
|
{
|
||||||
UINT8 i = 1; // player 1 is the last unchanging setup
|
UINT8 i = 1; // player 1 is the last unchanging setup
|
||||||
|
|
||||||
while (i < 4)
|
while (i < 4)
|
||||||
{
|
{
|
||||||
if (i < cv_dummysplitplayers.value)
|
if (i < cv_splitplayers.value)
|
||||||
MP_SetPlayersMenu[i+1].status = IT_STRING|IT_CALL;
|
MP_SetPlayersMenu[i+1].status = IT_STRING|IT_CALL;
|
||||||
else
|
else
|
||||||
MP_SetPlayersMenu[i+1].status = IT_GRAYEDOUT;
|
MP_SetPlayersMenu[i+1].status = IT_GRAYEDOUT;
|
||||||
|
@ -3144,7 +3144,7 @@ void M_Init(void)
|
||||||
|
|
||||||
// Menu hacks
|
// Menu hacks
|
||||||
#ifndef NOFOURPLAYER
|
#ifndef NOFOURPLAYER
|
||||||
CV_RegisterVar(&cv_dummysplitplayers);
|
CV_RegisterVar(&cv_splitplayers);
|
||||||
#endif
|
#endif
|
||||||
CV_RegisterVar(&cv_dummyteam);
|
CV_RegisterVar(&cv_dummyteam);
|
||||||
CV_RegisterVar(&cv_dummyscramble);
|
CV_RegisterVar(&cv_dummyscramble);
|
||||||
|
@ -7398,7 +7398,7 @@ static void M_StartServer(INT32 choice)
|
||||||
#ifdef NOFOURPLAYER
|
#ifdef NOFOURPLAYER
|
||||||
1;
|
1;
|
||||||
#else
|
#else
|
||||||
cv_dummysplitplayers.value-1;
|
cv_splitplayers.value-1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
(void)choice;
|
(void)choice;
|
||||||
|
@ -7643,7 +7643,7 @@ static void M_DrawServerMenu(void)
|
||||||
pskin = 0;
|
pskin = 0;
|
||||||
|
|
||||||
#ifndef NOFOURPLAYER
|
#ifndef NOFOURPLAYER
|
||||||
if (!trans && i > cv_dummysplitplayers.value)
|
if (!trans && i > cv_splitplayers.value)
|
||||||
trans = V_TRANSLUCENT;
|
trans = V_TRANSLUCENT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue