78 if (
m_Player.GetActionManager() &&
m_Player.GetActionManager().GetRunningAction())
108 if (pEntity.HasBayonetAttached())
112 else if (pEntity.HasButtstockAttached())
140 if (invFSM && !invFSM.IsIdle())
145 bool isFireWeapon = itemInHands && itemInHands.IsWeapon();
148 if (
HandleHitEvent(pCurrentCommandID, pInputs, itemInHands, pMovementState, pContinueAttack))
152 if ((pInputs.IsAttackButtonDown() && !isFireWeapon) || (pInputs.IsMeleeWeaponAttack() && isFireWeapon) || (pContinueAttack && isFireWeapon))
161 if (itemInHands && !itemInHands.IsMeleeWeapon() && !isFireWeapon)
178 return HandleInitialMeleeErc(pCurrentCommandID, pInputs, itemInHands, pMovementState, pContinueAttack);
183 return HandleProneKick(pCurrentCommandID, pInputs, itemInHands, pMovementState, pContinueAttack);
188 return HandleSprintAttack(pCurrentCommandID, pInputs, itemInHands, pMovementState, pContinueAttack);
198 return HandleComboHit(pCurrentCommandID, pInputs, itemInHands, pMovementState, pContinueAttack);
208 int roll = pInputs.IsMeleeLREvade();
230 hcm.StartMeleeEvadeA(angle);
237 m_Player.m_ShockHandler.CheckValue(
true);
243 if (pInputs.IsWeaponRaised() && pMovementState.m_iStanceIdx ==
DayZPlayerConstants.STANCEIDX_CROUCH)
261 if (hcm.GetCurrentInputAngle(angle2) && (angle2 < -130.0 || angle2 > 130))
263 hcm.SetMeleeBlock(
true);
268 hcm.SetMeleeBlock(
false);
274 hcm.SetMeleeBlock(
false);
342 if (weapon.IsWaitingForActionFinish())
348 if (hcm.GetCurrentMovementSpeed() <= 2.05 && (pMovementState.m_iStanceIdx ==
DayZPlayerConstants.STANCEIDX_RAISEDERECT || pContinueAttack) && !
m_Player.IsFighting())
365 pContinueAttack =
false;
375 pContinueAttack =
true;
400 if (finisherType != -1)
403 if (animationType > -1)
415 target.SetBeingBackstabbed(finisherType);
429 m_Player.m_ShockHandler.CheckValue(
true);
438 m_Player.m_ShockHandler.CheckValue(
true);
454 float hcw_angle = hcw.GetBaseAimingAngleLR();
457 if ( ( hcw_angle < -90 || hcw_angle > 90 ) &&
m_Player.GetBrokenLegs() !=
eBrokenLegs.BROKEN_LEGS )
519 if (itemInHands && itemInHands.IsWeapon())
538 m_Player.GetCommand_Melee2().ContinueCombo(isHeavy, attackByDistance, target,
m_MeleeCombat.GetHitPos());
550 m_Player.m_ShockHandler.CheckValue(
true);
604 int forcedWeaponMode = -1;
606 bool forcedDummy =
false;
612 vector targetPos = targetPlayer.GetPosition();
616 float hitAngle =
Math.RAD2DEG *
Math.AbsFloat(
Math3D.AngleFromPosition(targetPos, MiscGameplayFunctions.GetHeadingVector(targetPlayer), agressorPos));
619 if (targetPlayer.GetMeleeFightLogic() && targetPlayer.GetMeleeFightLogic().IsInBlock() && hitAngle <=
GameConstants.PVP_MAX_BLOCKABLE_ANGLE)
623 forcedWeaponMode = --weaponMode;
663 if (forcedWeaponMode > -1)
664 weaponMode = forcedWeaponMode;
674 hitPosWS = targetEntity.ModelToWorld(targetEntity.GetDefaultHitPosition());
678 DamageSystem.CloseCombatDamage(
m_Player, target, hitZoneIdx, ammo, hitPosWS);
683 m_Player.ProcessMeleeHit(weapon, weaponMode, target, hitZoneIdx, hitPosWS);
691 if (
GetGame().IsServer() && targetEntity)
694 hitPosWS = targetEntity.ModelToWorld(targetEntity.GetDefaultHitPosition());
695 DamageSystem.CloseCombatDamage(
m_Player, target, hitZoneIdx, ammo, hitPosWS);
724 ItemBase bayonet =
ItemBase.Cast(weapon.GetInventory().FindAttachment(weapon.GetBayonetAttachmentIdx()));
726 if ( firearm && bayonet && bayonet.IsRuined() )
728 ammo = bayonet.GetRuinedMeleeAmmoType();
731 else if (weapon.IsRuined())
733 ammo = weapon.GetRuinedMeleeAmmoType();
755 targetType = target.GetMeleeTargetType();
797 Param1<int> param =
new Param1<int>(cooldownCategory);
798 m_CooldownTimers.Get(cooldownCategory).Run(time,
this,
"ResetCooldown", param);
803 switch (cooldownCategory)
819 if (itemInHands || !target || !DZPlayer)
828 if (gloves && gloves.GetHealthLevel() <
GameConstants.STATE_RUINED)
830 gloves.DecreaseHealth(
"",
"", 1);
838 BleedingSourcesManagerServer bleedingManager;
847 randNum =
Math.RandomIntInclusive(1, 15);
853 bleedingManager =
m_Player.GetBleedingManagerServer();
855 bleedingManager.AttemptAddBleedingSourceBySelection(
"RightForeArmRoll");
862 bleedingManager =
m_Player.GetBleedingManagerServer();
864 bleedingManager.AttemptAddBleedingSourceBySelection(
"LeftForeArmRoll");
872 randNum =
Math.RandomIntInclusive(1, 15);
879 bleedingManager =
m_Player.GetBleedingManagerServer();
881 bleedingManager.AttemptAddBleedingSourceBySelection(
"LeftToeBase");
888 bleedingManager =
m_Player.GetBleedingManagerServer();
890 bleedingManager.AttemptAddBleedingSourceBySelection(
"LeftFoot");
916 switch (finisher_type)
935 switch (finisher_type)
938 ret =
"FinisherHitNeck";