diff --git a/src/command.c b/src/command.c index 6bbf58c44..c71fece57 100644 --- a/src/command.c +++ b/src/command.c @@ -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) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index b03eb478e..e26debd91 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -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 } diff --git a/src/http-mserv.c b/src/http-mserv.c index 68851483a..2def3cf8d 100644 --- a/src/http-mserv.c +++ b/src/http-mserv.c @@ -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; diff --git a/src/i_tcp.c b/src/i_tcp.c index 1ca1b7f22..48f04b2be 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -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 diff --git a/src/mserv.c b/src/mserv.c index 37a5ea89c..98dd0820b 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -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(); { diff --git a/src/v_video.c b/src/v_video.c index 7e01f3393..7f0b86398 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -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;