- Clean up some leftover floats in the input code.

This commit is contained in:
Mitchell Richters 2023-11-04 20:51:47 +11:00
parent ef20d9a48a
commit da81b63256
2 changed files with 6 additions and 6 deletions

View file

@ -513,7 +513,7 @@ void GameInterface::doPlayerMovement()
if (isRRRA() && (p->OnMotorcycle || p->OnBoat))
{
static constexpr double VEHICLETURN = (20.f * 360.f / 2048.f);
static constexpr double VEHICLETURN = (20. * 360. / 2048.);
double baseVel, velScale; unsigned vehFlags;
if (p->OnMotorcycle)

View file

@ -933,7 +933,7 @@ void UpdatePlayerSpriteAngle(DSWPlayer* pp)
//
//---------------------------------------------------------------------------
void DoPlayerVehicleInputScaling(DSWPlayer* const pp, DAngle DRotator::* angle, const float scale)
static void DoPlayerVehicleInputScaling(DSWPlayer* const pp, DAngle DRotator::* const angle, const double scale)
{
DAngle& currYaw = pp->cmd.ucmd.ang.*angle;
@ -1932,8 +1932,8 @@ void DoPlayerMoveVehicle(DSWPlayer* pp)
double floordist = abs(zz - pp->sop->floor_loz);
gameInput.ForceInputSync(pp->pnum);
DoPlayerVehicleInputScaling(pp, &DRotator::Yaw, 0.125f);
DoPlayerVehicleInputScaling(pp, &DRotator::Pitch, 0.125f);
DoPlayerVehicleInputScaling(pp, &DRotator::Yaw, 0.125);
DoPlayerVehicleInputScaling(pp, &DRotator::Pitch, 0.125);
if (RectClip)
{
@ -2067,8 +2067,8 @@ void DoPlayerMoveTurret(DSWPlayer* pp)
gameInput.ForceInputSync(pp->pnum);
DoPlayerVehicleInputScaling(pp, &DRotator::Yaw, 0.125f);
DoPlayerVehicleInputScaling(pp, &DRotator::Pitch, 0.125f);
DoPlayerVehicleInputScaling(pp, &DRotator::Yaw, 0.125);
DoPlayerVehicleInputScaling(pp, &DRotator::Pitch, 0.125);
if (pp->cmd.ucmd.ang.Yaw != nullAngle)
{