3696 {
3697
3699 {
3700 float avgLegHealth = GetHealth("RightLeg","") + GetHealth("LeftLeg","") + GetHealth("RightFoot","") + GetHealth("LeftFoot","");
3701 avgLegHealth *= 0.25;
3702
3703 if (IsSwimming())
3704 {
3705
3706 vector v;
3707 PhysicsGetVelocity(v);
3708
3710 {
3712 }
3713 }
3715 {
3716 if (IsClimbingLadder())
3717 {
3718 MovingShock(avgLegHealth, PlayerConstants.BROKEN_LEGS_HIGH_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_MID_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_LOW_SHOCK_WALK);
3719 }
3721 {
3723 {
3724 MovingShock(avgLegHealth, PlayerConstants.BROKEN_LEGS_HIGH_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_MID_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_LOW_SHOCK_WALK);
3725 }
3726 }
3728 {
3729
3730 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);
3731 }
3732 }
3733 else
3734 {
3735
3736 m_ShockHandler.SetShock(PlayerConstants.BROKEN_LEGS_STAND_SHOCK);
3737 }
3738
3740 }
3741 }
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++