add FloatBobStrength Actor property, a multiplier on Z offset created by FloatBob behavior. default of 1.0 is current behavior, set higher/lower for more/less extreme bobbing.
This commit is contained in:
parent
f593e2aa3c
commit
2c7a0c87c8
5 changed files with 16 additions and 1 deletions
|
|
@ -282,6 +282,7 @@ DEFINE_FIELD(AActor, Floorclip)
|
|||
DEFINE_FIELD(AActor, DamageType)
|
||||
DEFINE_FIELD(AActor, DamageTypeReceived)
|
||||
DEFINE_FIELD(AActor, FloatBobPhase)
|
||||
DEFINE_FIELD(AActor, FloatBobStrength)
|
||||
DEFINE_FIELD(AActor, RipperLevel)
|
||||
DEFINE_FIELD(AActor, RipLevelMin)
|
||||
DEFINE_FIELD(AActor, RipLevelMax)
|
||||
|
|
@ -443,6 +444,7 @@ void AActor::Serialize(FSerializer &arc)
|
|||
("inventory", Inventory)
|
||||
A("inventoryid", InventoryID)
|
||||
A("floatbobphase", FloatBobPhase)
|
||||
A("floatbobstrength", FloatBobStrength)
|
||||
A("translation", Translation)
|
||||
A("bloodcolor", BloodColor)
|
||||
A("bloodtranslation", BloodTranslation)
|
||||
|
|
@ -7988,7 +7990,7 @@ double AActor::GetBobOffset(double ticfrac) const
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
return BobSin(FloatBobPhase + level.maptime + ticfrac);
|
||||
return BobSin(FloatBobPhase + level.maptime + ticfrac) * FloatBobStrength;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, GetBobOffset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue