diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 5fae9d171..c87eb5ee8 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -32,6 +32,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms #include "mapinfo.h" #include "dukeactor.h" +CVAR(Bool, cl_rrvehicletilting, false, CVAR_ARCHIVE); + BEGIN_DUKE_NS @@ -723,9 +725,14 @@ static unsigned outVehicleFlags(player_struct* p, ESyncBits& actions) static void doVehicleTilting(player_struct* const p, const bool canTilt) { + const auto pact = p->GetActor(); + const auto adj = DAngle::fromDeg(p->sync.avel * 0.375 * canTilt); p->oTiltStatus = p->TiltStatus; - p->TiltStatus += DAngle::fromDeg(p->sync.avel * 0.375 * canTilt); + + p->TiltStatus += adj; + pact->spr.Angles.Roll += adj * cl_rrvehicletilting; scaletozero(p->TiltStatus, 10.); + scaletozero(pact->spr.Angles.Roll, 10.); } //--------------------------------------------------------------------------- @@ -2694,7 +2701,10 @@ void processinput_r(int snum) } } - p->Angles.doRollInput(&p->sync, p->vel.XY(), maxVel, (psectlotag == 1) || (psectlotag == 2)); + if (!p->OnMotorcycle && !p->OnBoat) + { + p->Angles.doRollInput(&p->sync, p->vel.XY(), maxVel, (psectlotag == 1) || (psectlotag == 2)); + } HORIZONLY: diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 7dc471c27..641849768 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1140,6 +1140,10 @@ OptionMenu "VideoOptions" protected } Option "$DSPLYMNU_VIEWTILTING", "cl_viewtilting", "ViewTilting" Slider "$DSPLYMNU_VIEWTILTSCALE", "cl_viewtiltscale", 0.0, 2.0, 0.05 + ifgame (RedneckRides) + { + Option "$DSPLYMNU_VEHTILTING", "cl_rrvehicletilting", "OnOff" + } Slider "$DSPLYMNU_FOV", "r_fov", 60, 130, 10, 1 StaticText ""