From 48630914b1b2dbe080743f55d2e13fde53a54706 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 9 Sep 2020 00:34:51 +1000 Subject: [PATCH] - SW: Remove boat code from new input code for cleanliness. --- source/sw/src/game.h | 5 ++--- source/sw/src/input.cpp | 10 ++-------- source/sw/src/player.cpp | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/source/sw/src/game.h b/source/sw/src/game.h index 6952c3f9a..1c8c107fa 100644 --- a/source/sw/src/game.h +++ b/source/sw/src/game.h @@ -1057,9 +1057,8 @@ enum PF2_TELEPORTED = (BIT(0)), PF2_INPUT_CAN_AIM = (BIT(1)), // Allow calling DoPlayerHorizon() from processMovement() PF2_INPUT_CAN_TURN_GENERAL = (BIT(2)), // Allow calling DoPlayerTurn() from processMovement() - PF2_INPUT_CAN_TURN_BOAT = (BIT(3)), // Allow calling DoPlayerTurnBoat() from processMovement() - PF2_INPUT_CAN_TURN_VEHICLE = (BIT(4)), // Allow calling DoPlayerTurnVehicle() from processMovement() - PF2_INPUT_CAN_MOVE_TURRET = (BIT(5)), // Allow calling DoPlayerMoveTurret() from processMovement() + PF2_INPUT_CAN_TURN_VEHICLE = (BIT(3)), // Allow calling DoPlayerTurnVehicle() from processMovement() + PF2_INPUT_CAN_MOVE_TURRET = (BIT(4)), // Allow calling DoPlayerMoveTurret() from processMovement() }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/sw/src/input.cpp b/source/sw/src/input.cpp index 512e078d2..fd4c43f82 100644 --- a/source/sw/src/input.cpp +++ b/source/sw/src/input.cpp @@ -36,7 +36,6 @@ BEGIN_SW_NS void DoPlayerHorizon(PLAYERp pp, fixed_t const q16horz, double const scaleAdjust); void DoPlayerTurn(PLAYERp pp, fixed_t const q16avel, double const scaleAdjust); -// void DoPlayerTurnBoat(PLAYERp pp, fixed_t q16avel); void DoPlayerTurnVehicle(PLAYERp pp, fixed_t q16avel, int z, int floor_dist); void DoPlayerMoveTurret(PLAYERp pp, fixed_t q16avel, fixed_t q16horz, double const scaleAdjust); @@ -289,19 +288,14 @@ static void processMovement(PLAYERp const pp, ControlInfo* const hidInput, bool if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN_GENERAL)) DoPlayerTurn(pp, q16avel, scaleAdjust); -#if 0 - if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN_BOAT)) - DoPlayerTurnBoat(pp, q16avel); -#endif + if (pp->angAdjust) + pp->q16ang = (pp->q16ang + FloatToFixed(scaleAdjust * pp->angAdjust)) & 0x7FFFFFF; if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN_VEHICLE)) DoPlayerTurnVehicle(pp, q16avel, pp->posz + Z(10), labs(pp->posz + Z(10) - pp->sop->floor_loz)); if (TEST(pp->Flags2, PF2_INPUT_CAN_MOVE_TURRET)) DoPlayerMoveTurret(pp, q16avel, q16horz, scaleAdjust); - - if (pp->angAdjust) - pp->q16ang = (pp->q16ang + FloatToFixed(scaleAdjust * pp->angAdjust)) & 0x7FFFFFF; } loc.fvel = clamp(loc.fvel + fvel, -MAXFVEL, MAXFVEL); diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 110cc7cbe..e52482ef9 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -7439,7 +7439,7 @@ domovethings(void) ChopsCheck(pp); // Reset flags used while tying input to framerate - RESET(pp->Flags2, PF2_INPUT_CAN_AIM|PF2_INPUT_CAN_TURN_GENERAL|PF2_INPUT_CAN_TURN_BOAT|PF2_INPUT_CAN_TURN_VEHICLE|PF2_INPUT_CAN_MOVE_TURRET); + RESET(pp->Flags2, PF2_INPUT_CAN_AIM|PF2_INPUT_CAN_TURN_GENERAL|PF2_INPUT_CAN_TURN_VEHICLE|PF2_INPUT_CAN_MOVE_TURRET); resetinputhelpers(pp); if (pp->DoPlayerAction) pp->DoPlayerAction(pp);