diff --git a/src/cvars.cpp b/src/cvars.cpp index 809216600..1aa0d9a0b 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -804,6 +804,7 @@ consvar_t cv_capsuletest = OnlineCheat("capsuletest", "Off").values(capsuletest_ consvar_t cv_debugcheese = OnlineCheat("debugcheese", "Off").on_off().description("Disable checks that prevent farming item boxes"); consvar_t cv_debugencorevote = OnlineCheat("debugencorevote", "Off").on_off().description("Force encore choice to appear on vote screen"); +consvar_t cv_debuglapcheat = OnlineCheat("debuglapcheat", "Off").on_off().description("Permit far waypoint jumps and disable lap cheat prevention"); consvar_t cv_forcebots = OnlineCheat("forcebots", "No").yes_no().description("Force bots to appear, even in wrong game modes"); void ForceSkin_OnChange(void); diff --git a/src/k_kart.c b/src/k_kart.c index a4ef754e0..f9e3a17ea 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -9935,18 +9935,27 @@ static void K_UpdatePlayerWaypoints(player_t *const player) UINT32 delta = u32_delta(player->distancetofinish, player->distancetofinishprev); if (player->respawn.state == RESPAWNST_NONE && delta > distance_threshold && old_currentwaypoint != NULL) { - CONS_Debug(DBG_GAMELOGIC, "Player %s: waypoint ID %d too far away (%u > %u)\n", - sizeu1(player - players), K_GetWaypointID(player->nextwaypoint), delta, distance_threshold); + extern consvar_t cv_debuglapcheat; +#define debug_args "Player %s: waypoint ID %d too far away (%u > %u)\n", \ + sizeu1(player - players), K_GetWaypointID(player->nextwaypoint), delta, distance_threshold + if (cv_debuglapcheat.value) + CONS_Printf(debug_args); + else + CONS_Debug(DBG_GAMELOGIC, debug_args); +#undef debug_args - // Distance jump is too great, keep the old waypoints and old distance. - player->currentwaypoint = old_currentwaypoint; - player->nextwaypoint = old_nextwaypoint; - player->distancetofinish = player->distancetofinishprev; - - // Start the auto respawn timer when the distance jumps. - if (!player->bigwaypointgap) + if (!cv_debuglapcheat.value) { - player->bigwaypointgap = 35; + // Distance jump is too great, keep the old waypoints and old distance. + player->currentwaypoint = old_currentwaypoint; + player->nextwaypoint = old_nextwaypoint; + player->distancetofinish = player->distancetofinishprev; + + // Start the auto respawn timer when the distance jumps. + if (!player->bigwaypointgap) + { + player->bigwaypointgap = 35; + } } } else