Add a cvar to control weapon bobbing while firing

This simulates a feature found in Crispy Doom, which keeps the
weapon bobbing while firing. This leads to a "smoother" appearance
which may look a bit prettier to some people.

The default value of 0 preserves the old behavior.
This commit is contained in:
Hugo Locurcio 2020-01-18 01:45:42 +01:00 committed by Christoph Oelckers
commit 80c5b4d37b
6 changed files with 25 additions and 10 deletions

View file

@ -790,6 +790,12 @@ DEFINE_ACTION_FUNCTION(_PlayerInfo, GetWBobSpeed)
ACTION_RETURN_FLOAT(self->userinfo.GetWBobSpeed());
}
DEFINE_ACTION_FUNCTION(_PlayerInfo, GetWBobFire)
{
PARAM_SELF_STRUCT_PROLOGUE(player_t);
ACTION_RETURN_FLOAT(self->userinfo.GetWBobFire());
}
DEFINE_ACTION_FUNCTION(_PlayerInfo, GetMoveBob)
{
PARAM_SELF_STRUCT_PROLOGUE(player_t);