mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public.git into next
This commit is contained in:
commit
7bf672a399
8 changed files with 146 additions and 28 deletions
|
@ -1178,7 +1178,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
// Draw background fade
|
||||
V_DrawFadeScreen(0xFF00, 16);
|
||||
|
||||
if (cl_mode != CL_DOWNLOADFILES && cl_mode != CL_LOADFILES
|
||||
if (cl_mode != CL_DOWNLOADFILES && cl_mode != CL_LOADFILES && cl_mode != CL_CHECKFILES
|
||||
#ifdef HAVE_CURL
|
||||
&& cl_mode != CL_DOWNLOADHTTPFILES
|
||||
#endif
|
||||
|
@ -1214,15 +1214,9 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
break;
|
||||
#endif
|
||||
case CL_ASKFULLFILELIST:
|
||||
case CL_CHECKFILES:
|
||||
cltext = M_GetText("Checking server addon list ...");
|
||||
break;
|
||||
case CL_CONFIRMCONNECT:
|
||||
cltext = "";
|
||||
break;
|
||||
case CL_LOADFILES:
|
||||
cltext = M_GetText("Loading server addons...");
|
||||
break;
|
||||
case CL_ASKJOIN:
|
||||
case CL_WAITJOINRESPONSE:
|
||||
if (serverisfull)
|
||||
|
@ -1244,7 +1238,29 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (cl_mode == CL_LOADFILES)
|
||||
if (cl_mode == CL_CHECKFILES)
|
||||
{
|
||||
INT32 totalfileslength;
|
||||
INT32 checkednum = 0;
|
||||
INT32 i;
|
||||
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-24, V_YELLOWMAP, "Press ESC to abort");
|
||||
|
||||
//ima just count files here
|
||||
for (i = 0; i < fileneedednum; i++)
|
||||
if (fileneeded[i].status != FS_NOTCHECKED)
|
||||
checkednum++;
|
||||
|
||||
// Loading progress
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24-32, V_YELLOWMAP, "Checking server addons...");
|
||||
totalfileslength = (INT32)((checkednum/(double)(fileneedednum)) * 256);
|
||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);
|
||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, 256, 8, 175);
|
||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, totalfileslength, 8, 160);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24, V_20TRANS|V_MONOSPACE,
|
||||
va(" %2u/%2u Files",checkednum,fileneedednum));
|
||||
}
|
||||
else if (cl_mode == CL_LOADFILES)
|
||||
{
|
||||
INT32 totalfileslength;
|
||||
INT32 loadcompletednum = 0;
|
||||
|
@ -1322,7 +1338,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, 256, 8, 175);
|
||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, totalfileslength, 8, 160);
|
||||
|
||||
if (totalfilesrequestedsize>>20 >= 100) //display in MB if over 100MB
|
||||
if (totalfilesrequestedsize>>20 >= 10) //display in MB if over 10MB
|
||||
V_DrawString(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, V_20TRANS|V_MONOSPACE,
|
||||
va(" %4uM/%4uM",totaldldsize>>20,totalfilesrequestedsize>>20));
|
||||
else
|
||||
|
@ -2168,7 +2184,7 @@ static boolean CL_FinishedFileList(void)
|
|||
}
|
||||
|
||||
#ifndef NONET
|
||||
if (totalfilesrequestedsize>>20 >= 100)
|
||||
if (totalfilesrequestedsize>>20 >= 10)
|
||||
downloadsize = Z_StrDup(va("%uM",totalfilesrequestedsize>>20));
|
||||
else
|
||||
downloadsize = Z_StrDup(va("%uK",totalfilesrequestedsize>>10));
|
||||
|
@ -3565,17 +3581,17 @@ static CV_PossibleValue_t discordinvites_cons_t[] = {{0, "Admins Only"}, {1, "Ev
|
|||
consvar_t cv_discordinvites = {"discordinvites", "Everyone", CV_SAVE|CV_CALL, discordinvites_cons_t, Joinable_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t resynchattempts_cons_t[] = {{0, "MIN"}, {20, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_resynchattempts = {"resynchattempts", "5", CV_SAVE, resynchattempts_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL };
|
||||
consvar_t cv_resynchattempts = {"resynchattempts", "2", CV_SAVE, resynchattempts_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL };
|
||||
consvar_t cv_blamecfail = {"blamecfail", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL };
|
||||
|
||||
// max file size to send to a player (in kilobytes)
|
||||
static CV_PossibleValue_t maxsend_cons_t[] = {{0, "MIN"}, {51200, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_maxsend = {"maxsend", "4096", CV_SAVE, maxsend_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_maxsend = {"maxsend", "MAX", CV_SAVE, maxsend_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_noticedownload = {"noticedownload", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
// Speed of file downloading (in packets per tic)
|
||||
static CV_PossibleValue_t downloadspeed_cons_t[] = {{0, "MIN"}, {32, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_downloadspeed = {"downloadspeed", "16", CV_SAVE, downloadspeed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_downloadspeed = {"downloadspeed", "MAX", CV_SAVE, downloadspeed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static void Got_AddPlayer(UINT8 **p, INT32 playernum);
|
||||
static void Got_RemovePlayer(UINT8 **p, INT32 playernum);
|
||||
|
|
|
@ -439,9 +439,9 @@ consvar_t cv_killingdead = {"killingdead", "Off", CV_NETVAR|CV_NOSHOWHELP, CV_On
|
|||
|
||||
consvar_t cv_netstat = {"netstat", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; // show bandwidth statistics
|
||||
static CV_PossibleValue_t nettimeout_cons_t[] = {{TICRATE/7, "MIN"}, {60*TICRATE, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_nettimeout = {"nettimeout", "105", CV_CALL|CV_SAVE, nettimeout_cons_t, NetTimeout_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_nettimeout = {"nettimeout", "210", CV_CALL|CV_SAVE, nettimeout_cons_t, NetTimeout_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
//static CV_PossibleValue_t jointimeout_cons_t[] = {{5*TICRATE, "MIN"}, {60*TICRATE, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_jointimeout = {"jointimeout", "105", CV_CALL|CV_SAVE, nettimeout_cons_t, JoinTimeout_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_jointimeout = {"jointimeout", "210", CV_CALL|CV_SAVE, nettimeout_cons_t, JoinTimeout_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t maxping_cons_t[] = {{0, "MIN"}, {1000, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_maxping = {"maxping", "800", CV_SAVE, maxping_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
|
|
|
@ -156,6 +156,9 @@ static void DRPC_HandleJoin(const char *secret)
|
|||
{
|
||||
char *ip = DRPC_XORIPString(secret);
|
||||
CONS_Printf("Connecting to %s via Discord\n", ip);
|
||||
M_ClearMenus(true); //Don't have menus open during connection screen
|
||||
if (demo.playback && demo.title)
|
||||
G_CheckDemoStatus(); //Stop the title demo, so that the connect command doesn't error if a demo is playing
|
||||
COM_BufAddText(va("connect \"%s\"\n", ip));
|
||||
free(ip);
|
||||
}
|
||||
|
|
16
src/g_game.c
16
src/g_game.c
|
@ -490,8 +490,8 @@ consvar_t cv_moveaxis = {"joyaxis_move", "None", CV_SAVE, joyaxis_cons_t, NULL,
|
|||
consvar_t cv_brakeaxis = {"joyaxis_brake", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_aimaxis = {"joyaxis_aim", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lookaxis = {"joyaxis_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis = {"joyaxis_fire", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_driftaxis = {"joyaxis_drift", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis = {"joyaxis_fire", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_driftaxis = {"joyaxis_drift", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_deadzone = {"joy_deadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_turnaxis2 = {"joyaxis2_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -499,8 +499,8 @@ consvar_t cv_moveaxis2 = {"joyaxis2_move", "None", CV_SAVE, joyaxis_cons_t, NULL
|
|||
consvar_t cv_brakeaxis2 = {"joyaxis2_brake", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_aimaxis2 = {"joyaxis2_aim", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lookaxis2 = {"joyaxis2_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis2 = {"joyaxis2_fire", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_driftaxis2 = {"joyaxis2_drift", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis2 = {"joyaxis2_fire", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_driftaxis2 = {"joyaxis2_drift", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_deadzone2 = {"joy2_deadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_turnaxis3 = {"joyaxis3_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -508,8 +508,8 @@ consvar_t cv_moveaxis3 = {"joyaxis3_move", "None", CV_SAVE, joyaxis_cons_t, NULL
|
|||
consvar_t cv_brakeaxis3 = {"joyaxis3_brake", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_aimaxis3 = {"joyaxis3_aim", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lookaxis3 = {"joyaxis3_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis3 = {"joyaxis3_fire", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_driftaxis3 = {"joyaxis3_drift", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis3 = {"joyaxis3_fire", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_driftaxis3 = {"joyaxis3_drift", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_deadzone3 = {"joy3_deadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_turnaxis4 = {"joyaxis4_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -517,8 +517,8 @@ consvar_t cv_moveaxis4 = {"joyaxis4_move", "None", CV_SAVE, joyaxis_cons_t, NULL
|
|||
consvar_t cv_brakeaxis4 = {"joyaxis4_brake", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_aimaxis4 = {"joyaxis4_aim", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_lookaxis4 = {"joyaxis4_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis4 = {"joyaxis4_fire", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_driftaxis4 = {"joyaxis4_drift", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_fireaxis4 = {"joyaxis4_fire", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_driftaxis4 = {"joyaxis4_drift", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_deadzone4 = {"joy4_deadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
|
||||
|
|
94
src/m_menu.c
94
src/m_menu.c
|
@ -262,6 +262,10 @@ static menu_t SP_TimeAttackDef, SP_ReplayDef, SP_GuestReplayDef, SP_GhostDef;
|
|||
|
||||
// Multiplayer
|
||||
#ifndef NONET
|
||||
static void M_PreStartServerMenu(INT32 choice);
|
||||
static void M_PreStartServerMenuChoice(event_t *ev);
|
||||
static void M_PreConnectMenu(INT32 choice);
|
||||
static void M_PreConnectMenuChoice(event_t *ev);
|
||||
static void M_StartServerMenu(INT32 choice);
|
||||
static void M_ConnectMenu(INT32 choice);
|
||||
static void M_ConnectMenuModChecks(INT32 choice);
|
||||
|
@ -996,7 +1000,7 @@ static menuitem_t MP_MainMenu[] =
|
|||
|
||||
{IT_HEADER, NULL, "Host a game", NULL, 100-24},
|
||||
#ifndef NONET
|
||||
{IT_STRING|IT_CALL, NULL, "Internet/LAN...", M_StartServerMenu, 110-24},
|
||||
{IT_STRING|IT_CALL, NULL, "Internet/LAN...", M_PreStartServerMenu, 110-24},
|
||||
#else
|
||||
{IT_GRAYEDOUT, NULL, "Internet/LAN...", NULL, 110-24},
|
||||
#endif
|
||||
|
@ -1004,7 +1008,7 @@ static menuitem_t MP_MainMenu[] =
|
|||
|
||||
{IT_HEADER, NULL, "Join a game", NULL, 132-24},
|
||||
#ifndef NONET
|
||||
{IT_STRING|IT_CALL, NULL, "Internet server browser...",M_ConnectMenuModChecks, 142-24},
|
||||
{IT_STRING|IT_CALL, NULL, "Internet server browser...",M_PreConnectMenu, 142-24},
|
||||
{IT_STRING|IT_KEYHANDLER, NULL, "Specify IPv4 address:", M_HandleConnectIP, 150-24},
|
||||
#else
|
||||
{IT_GRAYEDOUT, NULL, "Internet server browser...",NULL, 142-24},
|
||||
|
@ -8566,6 +8570,15 @@ static void M_DrawConnectMenu(void)
|
|||
V_DrawRightAlignedString(BASEVIDWIDTH - currentMenu->x, currentMenu->y + MP_ConnectMenu[mp_connect_page].alphaKey,
|
||||
highlightflags, va("%u of %d", serverlistpage+1, numPages));
|
||||
|
||||
// Did you change the Server Browser address? Have a little reminder.
|
||||
int mservflags = V_ALLOWLOWERCASE;
|
||||
if (CV_IsSetToDefault(&cv_masterserver))
|
||||
mservflags = mservflags|highlightflags|V_30TRANS;
|
||||
else
|
||||
mservflags = mservflags|warningflags;
|
||||
V_DrawRightAlignedSmallString(BASEVIDWIDTH - currentMenu->x, currentMenu->y+14 + MP_ConnectMenu[mp_connect_page].alphaKey,
|
||||
mservflags, va("MS: %s", cv_masterserver.string));
|
||||
|
||||
// Horizontal line!
|
||||
V_DrawFill(1, currentMenu->y+32, 318, 1, 0);
|
||||
|
||||
|
@ -8801,6 +8814,74 @@ static void M_ConnectMenuModChecks(INT32 choice)
|
|||
|
||||
M_ConnectMenu(-1);
|
||||
}
|
||||
|
||||
boolean firstDismissedNagThisBoot = true;
|
||||
|
||||
static void M_HandleMasterServerResetChoice(event_t *ev)
|
||||
{
|
||||
INT32 choice = -1;
|
||||
|
||||
choice = ev->data1;
|
||||
|
||||
if (ev->type == ev_keydown)
|
||||
{
|
||||
if (choice == ' ' || choice == 'y' || choice == KEY_ENTER || choice == gamecontrol[gc_accelerate][0] || choice == gamecontrol[gc_accelerate][1])
|
||||
{
|
||||
CV_Set(&cv_masterserver, cv_masterserver.defaultvalue);
|
||||
CV_Set(&cv_masterserver_nagattempts, cv_masterserver_nagattempts.defaultvalue);
|
||||
S_StartSound(NULL, sfx_s221);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (firstDismissedNagThisBoot)
|
||||
{
|
||||
if (cv_masterserver_nagattempts.value > 0)
|
||||
{
|
||||
CV_SetValue(&cv_masterserver_nagattempts, cv_masterserver_nagattempts.value - 1);
|
||||
}
|
||||
firstDismissedNagThisBoot = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void M_PreStartServerMenu(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
|
||||
if (!CV_IsSetToDefault(&cv_masterserver) && cv_masterserver_nagattempts.value > 0)
|
||||
{
|
||||
M_StartMessage(M_GetText("Hey! You've changed the Server Browser address.\n\nYou won't be able to host games on the official Server Browser.\nUnless you're from the future, this probably isn't what you want.\n\n\x83Press Accel\x80 to fix this and continue.\x80\nPress any other key to continue anyway.\n"),M_PreStartServerMenuChoice,MM_EVENTHANDLER);
|
||||
return;
|
||||
}
|
||||
|
||||
M_StartServerMenu(-1);
|
||||
}
|
||||
|
||||
static void M_PreConnectMenu(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
|
||||
if (!CV_IsSetToDefault(&cv_masterserver) && cv_masterserver_nagattempts.value > 0)
|
||||
{
|
||||
M_StartMessage(M_GetText("Hey! You've changed the Server Browser address.\n\nYou won't be able to see games from the official Server Browser.\nUnless you're from the future, this probably isn't what you want.\n\n\x83Press Accel\x80 to fix this and continue.\x80\nPress any other key to continue anyway.\n"),M_PreConnectMenuChoice,MM_EVENTHANDLER);
|
||||
return;
|
||||
}
|
||||
|
||||
M_ConnectMenuModChecks(-1);
|
||||
}
|
||||
|
||||
static void M_PreStartServerMenuChoice(event_t *ev)
|
||||
{
|
||||
M_HandleMasterServerResetChoice(ev);
|
||||
M_StartServerMenu(-1);
|
||||
}
|
||||
|
||||
static void M_PreConnectMenuChoice(event_t *ev)
|
||||
{
|
||||
M_HandleMasterServerResetChoice(ev);
|
||||
M_ConnectMenuModChecks(-1);
|
||||
}
|
||||
#endif //NONET
|
||||
|
||||
//===========================================================================
|
||||
|
@ -9015,6 +9096,15 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
|||
static void M_DrawServerMenu(void)
|
||||
{
|
||||
M_DrawLevelSelectOnly(false, false);
|
||||
if (currentMenu == &MP_ServerDef && cv_advertise.value) // Remind players where they're hosting.
|
||||
{
|
||||
int mservflags = V_ALLOWLOWERCASE;
|
||||
if (CV_IsSetToDefault(&cv_masterserver))
|
||||
mservflags = mservflags|highlightflags|V_30TRANS;
|
||||
else
|
||||
mservflags = mservflags|warningflags;
|
||||
V_DrawCenteredThinString(BASEVIDWIDTH/2, BASEVIDHEIGHT-12, mservflags, va("Master Server: %s", cv_masterserver.string));
|
||||
}
|
||||
M_DrawGenericMenu();
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,8 @@ consvar_t cv_masterserver_update_rate = {"masterserver_update_rate", "15", CV_SA
|
|||
|
||||
consvar_t cv_advertise = {"advertise", "No", CV_NETVAR|CV_CALL|CV_NOINIT, CV_YesNo, Advertise_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_masterserver_nagattempts = {"masterserver_nagattempts", "5", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
#if defined (MASTERSERVER) && defined (HAVE_THREADS)
|
||||
int ms_QueryId;
|
||||
I_mutex ms_QueryId_mutex;
|
||||
|
@ -98,6 +100,7 @@ void AddMServCommands(void)
|
|||
CV_RegisterVar(&cv_masterserver_timeout);
|
||||
CV_RegisterVar(&cv_masterserver_debug);
|
||||
CV_RegisterVar(&cv_masterserver_token);
|
||||
CV_RegisterVar(&cv_masterserver_nagattempts);
|
||||
CV_RegisterVar(&cv_advertise);
|
||||
CV_RegisterVar(&cv_servername);
|
||||
CV_RegisterVar(&cv_server_contact);
|
||||
|
|
|
@ -61,6 +61,8 @@ extern consvar_t cv_masterserver_token;
|
|||
|
||||
extern consvar_t cv_advertise;
|
||||
|
||||
extern consvar_t cv_masterserver_nagattempts;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
extern int ms_QueryId;
|
||||
extern I_mutex ms_QueryId_mutex;
|
||||
|
|
10
src/w_wad.c
10
src/w_wad.c
|
@ -672,7 +672,7 @@ UINT16 W_InitFile(const char *filename)
|
|||
else
|
||||
refreshdirname = NULL;
|
||||
|
||||
//CONS_Debug(DBG_SETUP, "Loading %s\n", filename);
|
||||
CONS_Printf("Loading %s\n", filename);
|
||||
//
|
||||
// check if limit of active wadfiles
|
||||
//
|
||||
|
@ -849,6 +849,7 @@ void W_UnloadWadFile(UINT16 num)
|
|||
INT32 W_InitMultipleFiles(char **filenames, boolean addons)
|
||||
{
|
||||
INT32 rc = 1;
|
||||
INT32 overallrc = 1;
|
||||
|
||||
// will be realloced as lumps are added
|
||||
for (; *filenames; filenames++)
|
||||
|
@ -857,13 +858,16 @@ INT32 W_InitMultipleFiles(char **filenames, boolean addons)
|
|||
G_SetGameModified(true, false);
|
||||
|
||||
//CONS_Debug(DBG_SETUP, "Loading %s\n", *filenames);
|
||||
rc &= (W_InitFile(*filenames) != INT16_MAX) ? 1 : 0;
|
||||
rc = W_InitFile(*filenames);
|
||||
if (rc == INT16_MAX)
|
||||
CONS_Printf(M_GetText("Errors occurred while loading %s; not added.\n"), *filenames);
|
||||
overallrc &= (rc != INT16_MAX) ? 1 : 0;
|
||||
}
|
||||
|
||||
if (!numwadfiles)
|
||||
I_Error("W_InitMultipleFiles: no files found");
|
||||
|
||||
return rc;
|
||||
return overallrc;
|
||||
}
|
||||
|
||||
/** Make sure a lump number is valid.
|
||||
|
|
Loading…
Reference in a new issue