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:
parent
89ce70fd0b
commit
994078feae
7 changed files with 17 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue