Add some variables for zeds' speed modifications

This commit is contained in:
Anton Tarasenko 2024-03-16 16:15:56 +07:00
parent bc5774f3d6
commit 8f1f36972b

View File

@ -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