4085 {
4086
4088 {
4089 float avgLegHealth = GetHealth("RightLeg","") + GetHealth("LeftLeg","") + GetHealth("RightFoot","") + GetHealth("LeftFoot","");
4090 avgLegHealth *= 0.25;
4091
4092 if (IsSwimming())
4093 {
4094
4095 vector v;
4096 PhysicsGetVelocity(v);
4097
4099 {
4101 }
4102 }
4104 {
4105 if (IsClimbingLadder())
4106 {
4107 MovingShock(avgLegHealth, PlayerConstants.BROKEN_LEGS_HIGH_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_MID_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_LOW_SHOCK_WALK);
4108 }
4110 {
4112 {
4113 MovingShock(avgLegHealth, PlayerConstants.BROKEN_LEGS_HIGH_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_MID_SHOCK_WALK, PlayerConstants.BROKEN_LEGS_LOW_SHOCK_WALK);
4114 }
4115 }
4117 {
4118
4119 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);
4120 }
4121 }
4122 else
4123 {
4124
4125 m_ShockHandler.SetShock(PlayerConstants.BROKEN_LEGS_STAND_SHOCK);
4126 }
4127
4129 }
4130 }
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++