From da81b632565b75593f3bd2a4ecdd0bd16b19ab63 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 4 Nov 2023 20:51:47 +1100 Subject: [PATCH] - Clean up some leftover floats in the input code. --- source/games/duke/src/input.cpp | 2 +- source/games/sw/src/player.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 5802896bd..183061a19 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -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) diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 1e9d8f17e..df2256f3a 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -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) {