mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-23 04:22:16 +00:00
- SW: Reduce some line lengths in DoPlayerVehicleInputScaling()
.
This commit is contained in:
parent
7c93d5127b
commit
63ba784d55
1 changed files with 3 additions and 4 deletions
|
@ -935,13 +935,12 @@ void UpdatePlayerSpriteAngle(DSWPlayer* pp)
|
||||||
|
|
||||||
void DoPlayerVehicleInputScaling(DSWPlayer* const pp, DAngle DRotator::* angle, const float scale)
|
void DoPlayerVehicleInputScaling(DSWPlayer* const pp, DAngle DRotator::* angle, const float scale)
|
||||||
{
|
{
|
||||||
SECTOR_OBJECT* sop = pp->sop;
|
|
||||||
DAngle& lastYaw = pp->lastcmd.ucmd.ang.*angle;
|
|
||||||
DAngle& currYaw = pp->cmd.ucmd.ang.*angle;
|
DAngle& currYaw = pp->cmd.ucmd.ang.*angle;
|
||||||
|
|
||||||
if (sop->drive_angspeed)
|
if (const auto angspeed = pp->sop->drive_angspeed)
|
||||||
{
|
{
|
||||||
currYaw = ((currYaw * sop->drive_angspeed) + (lastYaw * (sop->drive_angslide - 1))) / sop->drive_angslide;
|
const auto angslide = pp->sop->drive_angslide;
|
||||||
|
currYaw = ((currYaw * angspeed) + (pp->lastcmd.ucmd.ang.*angle * (angslide - 1))) / angslide;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue