From 479af14832ad6a7498cb167f9b2750bef5d9177f Mon Sep 17 00:00:00 2001 From: NepDisk Date: Fri, 23 May 2025 13:51:57 -0400 Subject: [PATCH] Add sliptide tilt toggle Thanks Jon for the idea! --- src/p_user.c | 2 +- src/r_main.cpp | 3 +++ src/r_main.h | 1 + src/r_patchrotation.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 4bbf23945..60c756648 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3639,7 +3639,7 @@ Quaketilt (player_t *player) delta = (INT32)(( moma + ANGLE_180 ) - player->mo->angle ); if (P_IsObjectOnGround(player->mo)) { - if (sliptiding) + if (sliptiding && cv_sliptidetilt.value) { tilt = ANGLE_45; lowb = 20*FRACUNIT; diff --git a/src/r_main.cpp b/src/r_main.cpp index 77191978b..7cc6c7d83 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -196,6 +196,8 @@ consvar_t cv_renderstats = CVAR_INIT ("renderstats", "Off", 0, CV_OnOff, NULL); consvar_t cv_sloperoll = CVAR_INIT ("spritesloperoll", "On", CV_SAVE, CV_OnOff, NULL); +consvar_t cv_sliptidetilt = CVAR_INIT ("sliptidetilt", "On", CV_SAVE, CV_OnOff, NULL); + void SplitScreen_OnChange(void) { UINT8 i; @@ -1836,6 +1838,7 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_tilting); CV_RegisterVar(&cv_actionmovie); CV_RegisterVar(&cv_sloperoll); + CV_RegisterVar(&cv_sliptidetilt); CV_RegisterVar(&cv_showhud); CV_RegisterVar(&cv_translucenthud); diff --git a/src/r_main.h b/src/r_main.h index b5c4e0968..aea3e6550 100644 --- a/src/r_main.h +++ b/src/r_main.h @@ -159,6 +159,7 @@ extern consvar_t cv_tailspickup; extern consvar_t cv_debugfinishline; extern consvar_t cv_sloperoll; +extern consvar_t cv_sliptidetilt; // debugging diff --git a/src/r_patchrotation.c b/src/r_patchrotation.c index 2bb1c1a58..7b88d792b 100644 --- a/src/r_patchrotation.c +++ b/src/r_patchrotation.c @@ -62,7 +62,7 @@ static angle_t R_PlayerSpriteRotation(player_t *player, player_t *viewPlayer) angle_t rollAngle = 0; - if (sliptideLift) + if (sliptideLift && cv_sliptidetilt.value) { /* (from side) tilt downward if turning toward camera, upward if away. */