Remove inverse slope option, merge quaketilt and slopeview into tilting cvar

(cherry picked from commit 3e9e51cf18f31d02c1e4330d9d49c16145da4da6)
This commit is contained in:
James R committed 2020-09-27 17:21:40 -07:00
1 parent 536589902d
commit 5070123d11
3 files changed
+17 -23

No files matched your search

+2 -2
View File
@@ -136,8 +136,8 @@ extern consvar_t cv_cam3_speed, cv_cam3_rotate, cv_cam3_rotspeed;
extern consvar_t cv_cam4_dist, cv_cam4_still, cv_cam4_height;
extern consvar_t cv_cam4_speed, cv_cam4_rotate, cv_cam4_rotspeed;
extern consvar_t cv_slopeview;
extern consvar_t cv_quaketilt;
extern consvar_t cv_tilting;
extern consvar_t cv_actionmovie;
extern consvar_t cv_windowquake;
+14 -19
View File
@@ -7108,16 +7108,8 @@ consvar_t cv_cam4_speed = {"cam4_speed", "0.4", CV_FLOAT|CV_SAVE, CV_CamSpeed, N
consvar_t cv_cam4_rotate = {"cam4_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate4_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_cam4_rotspeed = {"cam4_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t slopeview_cons_t[] =
{
{ 0, "Off" },
{ 1, "On" },
{ 2, "Inverse" },
consvar_t cv_tilting = {"tilting", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
{0}
};
consvar_t cv_slopeview = {"slopeview", "On", CV_SAVE, slopeview_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_quaketilt = {"quaketilt", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_actionmovie = {"actionmovie", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_windowquake = {"windowquake", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -8270,20 +8262,16 @@ DoABarrelRoll (player_t *player)
angle_t slope;
angle_t delta;
if (cv_slopeview.value && player->mo->standingslope)
if (player->mo->standingslope)
{
delta = ( player->mo->angle - player->mo->standingslope->xydirection );
slope = FixedMul(FINESINE (delta>>ANGLETOFINESHIFT),
player->mo->standingslope->zangle);
/* invert the screen tilt as if tilting the view instead */
if (cv_slopeview.value != 2)/* :james: mode */
slope = -slope;
slope = -(FixedMul(FINESINE (delta>>ANGLETOFINESHIFT),
player->mo->standingslope->zangle));
}
else
slope = 0;
if (cv_quaketilt.value)
slope += Quaketilt(player);
slope += Quaketilt(player);
delta = (INT32)( slope - player->viewrollangle )/ 32;
@@ -8842,6 +8830,15 @@ void P_PlayerThink(player_t *player)
K_KartPlayerThink(player, cmd); // SRB2kart
if (cv_tilting.value)
{
DoABarrelRoll(player);
}
else
{
player->viewrollangle = 0;
}
/*
// Colormap verification
{
@@ -8877,8 +8874,6 @@ void P_PlayerThink(player_t *player)
I_Error("I'm done!\n");
}*/
DoABarrelRoll(player);
}
//
+1 -2
View File
@@ -1846,8 +1846,7 @@ void R_RegisterEngineStuff(void)
CV_RegisterVar(&cv_cam4_rotate);
CV_RegisterVar(&cv_cam4_rotspeed);
CV_RegisterVar(&cv_slopeview);
CV_RegisterVar(&cv_quaketilt);
CV_RegisterVar(&cv_tilting);
CV_RegisterVar(&cv_actionmovie);
CV_RegisterVar(&cv_windowquake);