diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index 04bb11d..85b79d9 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -139,6 +139,25 @@ var float lastHeatTick; // resulting in a loss of potential damage var bool bFrugalFuelUsage; +//============================================================================== +//============================================================================== +// > Speed system +// Manages speed modifications from weapon attacks and other effects. +// +// This variable stores with how much stopping power zed was affected. +// Is a value from 0.0 to 1.0 and `1 - stoppingEffect` acts as speed multiplier +// for the zed +var float stoppingEffect; +// (Absolute) Point in time at which recovery would start, updated when zeds +// receives another stopping effect from somewhere +var float stoppingRecoveryStartTime; +// How much stopping effect would be rcovred in a second +var float stoppingRecoveryRate; +// Maximum stopping effect this zed can tank +var float maxStoppingEffect; +// Minimal stopping threshold for the zed (supposed to be subtracted from +// incoming effects' strenght). +var float minStoppingThreshold; //============================================================================== //============================================================================== // > Miscellaneous variables @@ -1570,13 +1589,13 @@ function Freeze(){ StopMovement(); Disable('AnimEnd'); StopAnimating(); - + if(Controller != none){ Controller.FocalPoint = Location + 512*vector(Rotation); Controller.Enemy = none; Controller.Focus = none; if(!Controller.IsInState('Freeze')) - Controller.GoToState('Freeze'); + Controller.GoToState('Freeze'); KFMonsterController(Controller).bUseFreezeHack = true; } bFrozenZed = true; @@ -2216,7 +2235,11 @@ defaultproperties DamageToMonsterScale=5.000000 RagdollLifeSpan=120.000000 ControllerClass=class'NiceMonsterController' - + stoppingEffect=0.0 + stoppingRecoveryStartTime=2.0 + stoppingRecoveryRate=0.5 + maxStoppingEffect=0.5 + minStoppingThreshold=0.0 Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN KConvulseSpacing=(Max=2.200000) KLinearDamping=0.150000