mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add debuglapcheat command, disables lap cheat prevention and prints a console message
This commit is contained in:
parent
6dbc093516
commit
0d4f42cf80
2 changed files with 20 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
29
src/k_kart.c
29
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue