mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- Duke: Adjust doVehicleTilting()
somewhat.
* Don't adjust and scale the player's roll, we can rely on `player_struct::TiltStatus` alone for this. * Ensure maximum tilt via full keyboard turn == (20. * 360. / 2048. * 0.5), same as original code.
This commit is contained in:
parent
04ac4561a8
commit
ad87f9ba54
1 changed files with 2 additions and 5 deletions
|
@ -729,16 +729,13 @@ static unsigned outVehicleFlags(player_struct* p, ESyncBits& actions)
|
|||
|
||||
static void doVehicleTilting(player_struct* const p, const bool canTilt)
|
||||
{
|
||||
const auto pact = p->GetActor();
|
||||
auto adj = DAngle::fromDeg(p->sync.avel * 0.279625 * canTilt);
|
||||
auto adj = DAngle::fromDeg(p->sync.avel * (545943. / 3200000.) * canTilt);
|
||||
if (p->OnMotorcycle) adj *= 5 * Sgn(p->MotoSpeed);
|
||||
if (cl_rrvehicletilting) adj *= cl_viewtiltscale;
|
||||
p->oTiltStatus = p->TiltStatus;
|
||||
|
||||
p->TiltStatus += adj;
|
||||
pact->spr.Angles.Roll += adj * cl_rrvehicletilting;
|
||||
scaletozero(p->TiltStatus, 10.);
|
||||
scaletozero(pact->spr.Angles.Roll, 10.);
|
||||
p->GetActor()->spr.Angles.Roll = (p->TiltStatus += adj) * cl_rrvehicletilting;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue