This commit is contained in:
Ashnal 2021-08-19 22:50:50 -04:00
commit 452390872b
5 changed files with 27 additions and 29 deletions

View file

@ -515,6 +515,10 @@ ifdef ZDEBUG
CPPFLAGS+=-DZDEBUG
endif
ifdef DUMPCONSISTENCY
CPPFLAGS+=-DDUMPCONSISTENCY
endif
ifdef DEVELOP
CPPFLAGS+=-DDEVELOP
endif

View file

@ -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();

View file

@ -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
{

View file

@ -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

View file

@ -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;
}