3 private const float HEALTHY_LEG = 100;
4 private int currentState = -1;
5 private const float TIME_TO_UPDATE = 0.5;
6 private float elapsedTime = TIME_TO_UPDATE + 1;
9 ref
static Timer timer;
26 player.GetNotifiersManager().ActivateByType(
eNotifiers.NTF_FRACTURE);
32 player.SetBrokenLegs(player.GetBrokenLegs());
33 player.GetNotifiersManager().ActivateByType(
eNotifiers.NTF_FRACTURE);
39 player.UpdateBrokenLegs(
eBrokenLegs.NO_BROKEN_LEGS);
40 if ( player.IsWearingSplint() )
42 MiscGameplayFunctions.RemoveSplint(player);
46 player.GetNotifiersManager().DeactivateByType(
eNotifiers.NTF_FRACTURE);
49 override bool DeactivateCondition(
PlayerBase player)
51 if ( player.GetHealth(
"RightLeg",
"Health") >= HEALTHY_LEG && player.GetHealth(
"LeftLeg",
"Health") >= HEALTHY_LEG )
62 override void OnTick(
PlayerBase player,
float deltaT)
64 player.UpdateBrokenLegs(0);
69 static void DelayedRequest(
PlayerBase player,
bool state)
73 timer.Run( 10 , player.GetModifiersManager().GetModifier(
eModifiers.MDF_BROKEN_LEGS),
"Delayed",
new Param1<bool>(state));
78 void Delayed(
bool state)