mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch '14-expedited' into 'master'
Expedited 1.4+ fixes See merge request KartKrew/Kart!649
This commit is contained in:
commit
66aa976cc2
6 changed files with 25 additions and 31 deletions
|
|
@ -2029,6 +2029,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
if (var->PossibleValue[max].value == var->value)
|
||||
currentindice = max;
|
||||
|
||||
// The following options will NOT handle netsyncing.
|
||||
if (var == &cv_chooseskin)
|
||||
{
|
||||
// Special case for the chooseskin variable, used only directly from the menu
|
||||
|
|
@ -2080,28 +2081,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
}
|
||||
else if (var == &cv_kartspeed)
|
||||
{
|
||||
INT32 maxspeed = (M_SecretUnlocked(SECRET_HARDSPEED) ? 2 : 1);
|
||||
// Special case for the kartspeed variable, used only directly from the menu to prevent selecting hard mode
|
||||
if (increment > 0) // Going up!
|
||||
{
|
||||
newvalue = var->value + 1;
|
||||
if (newvalue > maxspeed)
|
||||
newvalue = -1;
|
||||
var->value = newvalue;
|
||||
var->string = var->PossibleValue[var->value].strvalue;
|
||||
var->func();
|
||||
return;
|
||||
}
|
||||
else if (increment < 0) // Going down!
|
||||
{
|
||||
newvalue = var->value - 1;
|
||||
if (newvalue < -1)
|
||||
newvalue = maxspeed;
|
||||
var->value = newvalue;
|
||||
var->string = var->PossibleValue[var->value].strvalue;
|
||||
var->func();
|
||||
return;
|
||||
}
|
||||
max = (M_SecretUnlocked(SECRET_HARDSPEED) ? 3 : 2);
|
||||
}
|
||||
#ifdef PARANOIA
|
||||
if (currentindice == -1)
|
||||
|
|
|
|||
|
|
@ -3235,7 +3235,7 @@ void D_QuitNetGame(void)
|
|||
if (nodeingame[i])
|
||||
HSendPacket(i, true, 0, 0);
|
||||
#ifdef MASTERSERVER
|
||||
if (serverrunning && cv_advertise.value)
|
||||
if (serverrunning && netgame && cv_advertise.value) // see mserv.c Online()
|
||||
UnregisterServer();
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ Documentation available here.
|
|||
#include "doomdef.h"
|
||||
#include "d_clisrv.h"
|
||||
#include "command.h"
|
||||
#include "console.h"
|
||||
#include "m_argv.h"
|
||||
#include "m_menu.h"
|
||||
#include "mserv.h"
|
||||
|
|
@ -81,6 +82,19 @@ Contact_error (void)
|
|||
);
|
||||
}
|
||||
|
||||
static void
|
||||
Printf_url (const char *url)
|
||||
{
|
||||
boolean startup;
|
||||
|
||||
I_lock_mutex(&con_mutex);
|
||||
startup = con_startup;
|
||||
I_unlock_mutex(con_mutex);
|
||||
|
||||
(startup ? I_OutputMsg : CONS_Printf)(
|
||||
"HMS: connecting '%s'...\n", url);
|
||||
}
|
||||
|
||||
static size_t
|
||||
HMS_on_read (char *s, size_t _1, size_t n, void *userdata)
|
||||
{
|
||||
|
|
@ -180,7 +194,7 @@ HMS_connect (const char *format, ...)
|
|||
if (quack_token)
|
||||
sprintf(&url[seek], "&token=%s", quack_token);
|
||||
|
||||
CONS_Printf("HMS: connecting '%s'...\n", url);
|
||||
Printf_url(url);
|
||||
|
||||
buffer = malloc(sizeof *buffer);
|
||||
buffer->curl = curl;
|
||||
|
|
|
|||
|
|
@ -595,13 +595,13 @@ static boolean SOCK_Get(void)
|
|||
#ifdef USE_STUN
|
||||
if (STUN_got_response(doomcom->data, c))
|
||||
{
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (hole_punch(c))
|
||||
{
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
// find remote node number
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ static CV_PossibleValue_t masterserver_update_rate_cons_t[] = {
|
|||
};
|
||||
|
||||
consvar_t cv_masterserver = CVAR_INIT ("masterserver", "https://ms.kartkrew.org/ms/api", CV_SAVE|CV_CALL, NULL, MasterServer_OnChange);
|
||||
consvar_t cv_rendezvousserver = CVAR_INIT ("rendezvousserver", "relay.kartkrew.org", CV_SAVE|CV_CALL, NULL, RendezvousServer_OnChange);
|
||||
consvar_t cv_rendezvousserver = CVAR_INIT ("holepunchserver", "relay.kartkrew.org", CV_SAVE|CV_CALL, NULL, RendezvousServer_OnChange);
|
||||
consvar_t cv_servername = CVAR_INIT ("servername", "Ring Racers server", CV_SAVE|CV_CALL|CV_NOINIT, NULL, Update_parameters);
|
||||
consvar_t cv_server_contact = CVAR_INIT ("server_contact", "", CV_SAVE|CV_CALL|CV_NOINIT, NULL, Update_parameters);
|
||||
|
||||
|
|
@ -434,7 +434,7 @@ void UnregisterServer(void)
|
|||
static boolean
|
||||
Online (void)
|
||||
{
|
||||
return ( serverrunning && cv_advertise.value );
|
||||
return ( serverrunning && netgame && cv_advertise.value );
|
||||
}
|
||||
|
||||
static inline void SendPingToMasterServer(void)
|
||||
|
|
@ -532,7 +532,7 @@ Advertise_OnChange(void)
|
|||
|
||||
if (cv_advertise.value)
|
||||
{
|
||||
if (serverrunning)
|
||||
if (serverrunning && netgame)
|
||||
{
|
||||
Lock_state();
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1343,8 +1343,8 @@ void V_DrawVhsEffect(boolean rewind)
|
|||
if (rewind)
|
||||
V_DrawVhsEffect(false); // experimentation
|
||||
|
||||
upbary -= vid.dupy * (rewind ? 3 : 1.8f);
|
||||
downbary += vid.dupy * (rewind ? 2 : 1);
|
||||
upbary -= FixedMul(vid.dupy * (rewind ? 3 : 1.8f), renderdeltatics);
|
||||
downbary += FixedMul(vid.dupy * (rewind ? 2 : 1), renderdeltatics);
|
||||
if (upbary < -barsize) upbary = vid.height;
|
||||
if (downbary > vid.height) downbary = -barsize;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue