diff --git a/src/Makefile b/src/Makefile index da96f0cf..6ea7fd78 100644 --- a/src/Makefile +++ b/src/Makefile @@ -515,6 +515,10 @@ ifdef ZDEBUG CPPFLAGS+=-DZDEBUG endif +ifdef DUMPCONSISTENCY + CPPFLAGS+=-DDUMPCONSISTENCY +endif + ifdef DEVELOP CPPFLAGS+=-DDEVELOP endif diff --git a/src/d_clisrv.c b/src/d_clisrv.c index cfaa7e95..4fce89ef 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2484,7 +2484,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic key = I_GetKey(); // Only ESC and non-keyboard keys abort connection - if (key == KEY_ESCAPE || key >= KEY_MOUSE1 || cl_mode == CL_ABORTED) + if (!modeattacking && (key == KEY_ESCAPE || key >= KEY_MOUSE1 || cl_mode == CL_ABORTED)) { CONS_Printf(M_GetText("Network game synchronization aborted.\n")); D_QuitNetGame(); diff --git a/src/discord.c b/src/discord.c index 4f72b714..ba68da72 100644 --- a/src/discord.c +++ b/src/discord.c @@ -341,15 +341,14 @@ static void DRPC_GotServerIP(UINT32 address) { const unsigned char * p = (const unsigned char *)&address; sprintf(self_ip, "%u.%u.%u.%u:%u", p[0], p[1], p[2], p[3], current_port); - DRPC_UpdatePresence(); } /*-------------------------------------------------- static const char *DRPC_GetServerIP(void) Retrieves the IP address of the server that you're - connected to. Will attempt to use curl for getting your - own IP address, if it's not yours. + connected to. Will attempt to use STUN for getting your + own IP address. --------------------------------------------------*/ static const char *DRPC_GetServerIP(void) { @@ -362,8 +361,7 @@ static const char *DRPC_GetServerIP(void) { // We're not the server, so we could successfully get the IP! // No need to do anything else :) - sprintf(self_ip, "%s:%u", address, current_port); - return self_ip; + return address; } } @@ -442,25 +440,6 @@ void DRPC_UpdatePresence(void) // Server info if (netgame) { - if (DRPC_InvitesAreAllowed() == true) - { - const char *join; - - // Grab the host's IP for joining. - if ((join = DRPC_GetServerIP()) != NULL) - { - char *xorjoin = DRPC_XORIPString(join); - discordPresence.joinSecret = xorjoin; - free(xorjoin); - - joinSecretSet = true; - } - else - { - return; - } - } - if (cv_advertise.value) { discordPresence.state = "Public"; @@ -473,6 +452,18 @@ void DRPC_UpdatePresence(void) discordPresence.partyId = server_context; // Thanks, whoever gave us Mumble support, for implementing the EXACT thing Discord wanted for this field! discordPresence.partySize = D_NumPlayers(); // Players in server discordPresence.partyMax = discordInfo.maxPlayers; // Max players + + if (DRPC_InvitesAreAllowed() == true) + { + const char *join; + + // Grab the host's IP for joining. + if ((join = DRPC_GetServerIP()) != NULL) + { + discordPresence.joinSecret = DRPC_XORIPString(join); + joinSecretSet = true; + } + } } else { diff --git a/src/m_menu.c b/src/m_menu.c index 480c887b..15a61987 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2691,8 +2691,8 @@ boolean M_Responder(event_t *ev) M_QuitSRB2(0); return true; - case KEY_F11: // Gamma Level - CV_AddValue(&cv_usegamma, 1); + case KEY_F11: // Fullscreen + CV_AddValue(&cv_fullscreen, 1); return true; // Spymode on F12 handled in game logic diff --git a/src/st_stuff.c b/src/st_stuff.c index 9d726998..33394a81 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -232,7 +232,7 @@ void ST_doPaletteStuff(void) { st_palette = palette; - if (rendermode != render_none) + if (rendermode == render_soft) { //V_SetPaletteLump(GetPalette()); // Reset the palette -- is this needed? if (!splitscreen) @@ -392,7 +392,10 @@ static inline void ST_Stop(void) if (st_stopped) return; - V_SetPalette(0); +#ifdef HWRENDER + if (rendermode != render_opengl) +#endif + V_SetPalette(0); st_stopped = true; }