Added FloatBobFactor

This adds a new actor property: `FloatBobFactor` (default 1.0). This will be a multiplier for level.time in `AActor::GetBobOffset`, which finally allows to control not only the range of float bobbing (which is FloatBobStrength) but also the frequency of bobbing.
This commit is contained in:
jekyllgrim 2024-08-30 13:06:26 +03:00 committed by Rachael Alexanderson
commit 994078feae
7 changed files with 17 additions and 1 deletions

View file

@ -642,6 +642,16 @@ DEFINE_PROPERTY(floatbobstrength, F, Actor)
defaults->FloatBobStrength = id;
}
//==========================================================================
//
//==========================================================================
DEFINE_PROPERTY(floatbobfactor, F, Actor)
{
PROP_DOUBLE_PARM(id, 0);
if (id <= 0) I_Error ("FloatBobFactor must be above 0.0");
defaults->FloatBobFactor = id;
}
//==========================================================================
//
//==========================================================================

View file

@ -2035,6 +2035,7 @@ DEFINE_FIELD(AActor, DamageType)
DEFINE_FIELD(AActor, DamageTypeReceived)
DEFINE_FIELD(AActor, FloatBobPhase)
DEFINE_FIELD(AActor, FloatBobStrength)
DEFINE_FIELD(AActor, FloatBobFactor)
DEFINE_FIELD(AActor, RipperLevel)
DEFINE_FIELD(AActor, RipLevelMin)
DEFINE_FIELD(AActor, RipLevelMax)