diff --git a/source/core/coreplayer.h b/source/core/coreplayer.h index 9f3503fba..f07b5a533 100644 --- a/source/core/coreplayer.h +++ b/source/core/coreplayer.h @@ -39,10 +39,10 @@ public: // All overridable methods. virtual DCoreActor* GetActor() = 0; - virtual const bool canSlopeTilt() const { return false; } - virtual const unsigned getCrouchFlags() const = 0; + virtual bool canSlopeTilt() const { return false; } + virtual unsigned getCrouchFlags() const = 0; + virtual double GetMaxInputVel() const = 0; virtual const DVector2& GetInputVelocity() const { return actor->vel.XY(); } - virtual const double GetMaxInputVel() const = 0; // Angle prototypes. void doPitchInput(); diff --git a/source/games/blood/src/bloodactor.h b/source/games/blood/src/bloodactor.h index a8007f792..09581acbf 100644 --- a/source/games/blood/src/bloodactor.h +++ b/source/games/blood/src/bloodactor.h @@ -272,19 +272,19 @@ public: return static_cast<DBloodActor*>(actor); } - const double GetMaxInputVel() const override + double GetMaxInputVel() const override { return (36211. / 3000.); } - const bool canSlopeTilt() const override + bool canSlopeTilt() const override { const auto pActor = static_cast<DBloodActor*>(actor); const int florhit = pActor->hit.florhit.type; return pActor->xspr.height < 16 && (florhit == kHitSector || florhit == 0); } - const unsigned getCrouchFlags() const override + unsigned getCrouchFlags() const override { const bool swimming = posture == kPostureSwim; return (CS_CANCROUCH * !swimming) | (CS_DISABLETOGGLE * swimming); diff --git a/source/games/duke/src/types.h b/source/games/duke/src/types.h index 8fe39ee20..344e0f7f6 100644 --- a/source/games/duke/src/types.h +++ b/source/games/duke/src/types.h @@ -361,7 +361,7 @@ public: void checkhardlanding(); void playerweaponsway(double xvel); - const double GetMaxInputVel() const override + double GetMaxInputVel() const override { return (117351124. / 10884538.); } @@ -405,7 +405,7 @@ public: } } - const bool canSlopeTilt() const override + bool canSlopeTilt() const override { return aim_mode == 0 && on_ground && cursector->lotag != ST_2_UNDERWATER; } @@ -420,7 +420,7 @@ public: cmd.ucmd.setItemUsed(num - 1); } - const unsigned getCrouchFlags() const override + unsigned getCrouchFlags() const override { const int sectorLotag = insector() ? cursector->lotag : 0; const int crouchable = sectorLotag != ST_2_UNDERWATER && (sectorLotag != ST_1_ABOVE_WATER || spritebridge) && !jetpack_on; diff --git a/source/games/exhumed/src/player.h b/source/games/exhumed/src/player.h index c75e04afd..36a88c427 100644 --- a/source/games/exhumed/src/player.h +++ b/source/games/exhumed/src/player.h @@ -119,12 +119,12 @@ public: return static_cast<DExhumedActor*>(actor); } - const double GetMaxInputVel() const override + double GetMaxInputVel() const override { return 15.25; } - const unsigned getCrouchFlags() const override + unsigned getCrouchFlags() const override { return (CS_CANCROUCH * !bUnderwater) | (CS_DISABLETOGGLE * bUnderwater); } diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index f44090835..550952c23 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -1845,7 +1845,7 @@ public: uint8_t WpnReloadState; - const double GetMaxInputVel() const override + double GetMaxInputVel() const override { return (380401538. / 36022361.); } @@ -1855,7 +1855,7 @@ public: return vect; } - const bool canSlopeTilt() const override + bool canSlopeTilt() const override { return (cmd.ucmd.actions & SB_AIMMODE) && !(Flags & (PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING)); } @@ -1870,7 +1870,7 @@ public: GetActor()->spr.pos.Z = val - GetActor()->viewzoffset; } - const unsigned getCrouchFlags() const override + unsigned getCrouchFlags() const override { const bool crouchable = true; const bool disableToggle = (Flags & (PF_JUMPING|PF_FALLING|PF_CLIMBING|PF_DIVING|PF_DEAD)) || sop;