3678 {
3679
3681 {
3682 float avgLegHealth = GetHealth("RightLeg","") + GetHealth("LeftLeg","") + GetHealth("RightFoot","") + GetHealth("LeftFoot","");
3683 avgLegHealth *= 0.25;
3684
3685 if (IsSwimming())
3686 {
3687
3688 vector v;
3689 PhysicsGetVelocity(v);
3690
3692 {
3694 }
3695 }
3697 {
3698 if (IsClimbingLadder())
3699 {
3700 MovingShock(avgLegHealth, PlayerConstants.BROKEN_LEGS_HIGH_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_MID_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_LOW_SHOCK_WALK);
3701 }
3703 {
3705 {
3706 MovingShock(avgLegHealth, PlayerConstants.BROKEN_LEGS_HIGH_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_MID_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_LOW_SHOCK_WALK);
3707 }
3708 }
3710 {
3711
3712 MovingShock(avgLegHealth, PlayerConstants.BROKEN_LEGS_HIGH_SHOCK_WALK * PlayerConstants.BROKEN_CROUCH_MODIFIER, PlayerConstants.BROKEN_LEGS_MID_SHOCK_WALK * PlayerConstants.BROKEN_CROUCH_MODIFIER, PlayerConstants.BROKEN_LEGS_LOW_SHOCK_WALK * PlayerConstants.BROKEN_CROUCH_MODIFIER);
3713 }
3714 }
3715 else
3716 {
3717
3718 m_ShockHandler.SetShock(PlayerConstants.BROKEN_LEGS_STAND_SHOCK);
3719 }
3720
3722 }
3723 }
ref HumanMovementState m_MovementState
movement state
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
int m_iStanceIdx
current command's id
void MovingShock(float legHealth, float highShock, float midShock, float lowShock)
ref ShockHandler m_ShockHandler
proto native float LengthSq()
Returns squared length (magnitudeSqr)
DayZPlayerConstants
defined in C++