diff --git a/src/d_player.h b/src/d_player.h index 6f68aa6f7..5206fd770 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -337,7 +337,7 @@ struct userinfo_t : TMap { return *static_cast(*CheckKey(NAME_StillBob)); } - double GetWBobSpeed() const + float GetWBobSpeed() const { return *static_cast(*CheckKey(NAME_WBobSpeed)); } diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 4274d81a8..099a39f02 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -528,9 +528,6 @@ void P_DropWeapon (player_t *player) // //============================================================================ -// [SP] Changes how quickly the weapon bobs -EXTERN_CVAR(Float, wbobspeed) - void P_BobWeapon (player_t *player, float *x, float *y, double ticfrac) { static float curbob; @@ -555,8 +552,9 @@ void P_BobWeapon (player_t *player, float *x, float *y, double ticfrac) for (int i = 0; i < 2; i++) { - // Bob the weapon based on movement speed. - FAngle angle = (BobSpeed * wbobspeed * 35 / TICRATE*(level.time - 1 + i)) * (360.f / 8192.f); + // Bob the weapon based on movement speed. ([SP] And user's bob speed setting) + FAngle angle = (BobSpeed * player->userinfo.GetWBobSpeed() * 35 / + TICRATE*(level.time - 1 + i)) * (360.f / 8192.f); // [RH] Smooth transitions between bobbing and not-bobbing frames. // This also fixes the bug where you can "stick" a weapon off-center by