limit addon only stuff to server info screen
quite honestly everything else is awful and i dont want to bother with it
This commit is contained in:
1 parent
f12b55f63b
commit
00bc8bc149
3 files changed
+3
-38
No files matched your search
+3
-7
@@ -102,7 +102,7 @@ static patch_t *map_icon;
|
||||
|
||||
// if true, signals the game to only load addons AND gamestate
|
||||
// instead of fully joining a server
|
||||
boolean cl_addonsonly = false;
|
||||
static boolean cl_addonsonly = false;
|
||||
|
||||
plrinfo playerinfo[MAXPLAYERS] = {};
|
||||
SINT8 joinnode = 0; // used for CL_VIEWSERVER
|
||||
@@ -2584,7 +2584,7 @@ static boolean CL_ServerConnectionSearchTicker(tic_t *asksent)
|
||||
return true;
|
||||
}
|
||||
|
||||
cl_mode = (cv_serverinfoscreen.value && !cl_addonsonly) ? CL_VIEWSERVER : CL_CHECKFILES;
|
||||
cl_mode = cv_serverinfoscreen.value ? CL_VIEWSERVER : CL_CHECKFILES;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2640,7 +2640,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
||||
|
||||
case CL_ASKFULLFILELIST:
|
||||
if (cl_lastcheckedfilecount == UINT16_MAX) // All files retrieved
|
||||
cl_mode = (cv_serverinfoscreen.value && !cl_addonsonly) ? CL_VIEWSERVER : CL_CHECKFILES;
|
||||
cl_mode = cv_serverinfoscreen.value ? CL_VIEWSERVER : CL_CHECKFILES;
|
||||
else if (fileneedednum != cl_lastcheckedfilecount || I_GetTime() >= *asksent)
|
||||
{
|
||||
if (CL_AskFileList(fileneedednum))
|
||||
@@ -3340,10 +3340,6 @@ static void Command_connect(void)
|
||||
CONS_Alert(CONS_ERROR, M_GetText("There is no network driver\n"));
|
||||
}
|
||||
|
||||
// idk how that shit works
|
||||
//if (*COM_Argv(3) && fasticmp(COM_Argv(3), "-addonsonly"))
|
||||
//cl_addonsonly = true;
|
||||
|
||||
CV_Set(&cv_lastserver, I_GetNodeAddress(servernode));
|
||||
|
||||
if (splitscreen != cv_splitplayers.value-1)
|
||||
|
||||
@@ -552,8 +552,6 @@ typedef enum
|
||||
KR_LEAVE, //Quit the game
|
||||
} kickreason_t;
|
||||
|
||||
extern boolean cl_addonsonly;
|
||||
|
||||
/* the max number of name changes in some time period */
|
||||
#define MAXNAMECHANGES (5)
|
||||
#define NAMECHANGERATE (60*TICRATE)
|
||||
|
||||
@@ -1250,20 +1250,6 @@ boolean M_Responder(event_t *ev)
|
||||
|
||||
routine = currentMenu->menuitems[itemOn].itemaction;
|
||||
|
||||
// really hacky but the whole menu system sucks so
|
||||
// allows to just load addons and gamestate instead of joining
|
||||
if (currentMenu == &MP_ConnectDef &&
|
||||
(routine && routine == M_Connect) &&
|
||||
(ch == gamecontrol[0][gc_lookback][0] ||
|
||||
ch == gamecontrol[0][gc_lookback][1]))
|
||||
{
|
||||
cl_addonsonly = true;
|
||||
noFurtherInput = true;
|
||||
currentMenu->lastOn = itemOn;
|
||||
routine(itemOn);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Handle menuitems which need a specific key handling
|
||||
if (routine && (currentMenu->menuitems[itemOn].status & IT_TYPE) == IT_KEYHANDLER)
|
||||
{
|
||||
@@ -7084,21 +7070,6 @@ static void M_DrawConnectMenu(void)
|
||||
M_DrawServerLines(currentMenu->x, serverlistpage);
|
||||
}
|
||||
|
||||
// copy pasted this abomination from encore toggle
|
||||
if (itemOn > mp_connect_search)
|
||||
{
|
||||
char addontoggle[32] = {0};
|
||||
const char *item1 = gamecontrol[0][gc_lookback][0] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][0]) : NULL;
|
||||
const char *item2 = gamecontrol[0][gc_lookback][1] != 0 ? G_KeynumToString(gamecontrol[0][gc_lookback][1]) : NULL;
|
||||
|
||||
if (item1 != NULL && item2 != NULL)
|
||||
snprintf(addontoggle, 32, "%s/%s - Load Addons Only", item1, item2);
|
||||
else
|
||||
snprintf(addontoggle, 32, "%s - Load Addons Only", item1 != NULL ? item1 : item2 != NULL ? item2 : "Lookback");
|
||||
|
||||
V_DrawThinString(1, BASEVIDHEIGHT-8-1, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT|V_ALLOWLOWERCASE, addontoggle);
|
||||
}
|
||||
|
||||
INT32 input_y = currentMenu->menuitems[mp_connect_search].alphaKey;
|
||||
|
||||
V_DrawFill(currentMenu->x, currentMenu->y+input_y, MAXSTRINGLENGTH*8+6, 8+6, 239);
|
||||
|
||||
Reference in new issue
Block a user