class DayZPlayerImplementMeleeCombatSource
Constructors 2
void DayZPlayerImplementMeleeCombat(DayZPlayerImplement player)void ~DayZPlayerImplementMeleeCombat()Constants 11
protected const float TARGETING_ANGLE_NORMAL = 30.0Target selection settings
protected const float TARGETING_ANGLE_SPRINT = 15.0Second Pass: Half angle of cone during sprint
protected const float TARGETING_MIN_HEIGHT = -2.0Second Pass: How deep the cone goes in meters from player position
protected const float TARGETING_MAX_HEIGHT = 2.0Second Pass: How high the cone goes in meters from player position
protected const float TARGETING_RAY_RADIUS_EX = 0.5Second Pass: Max distance from ray projected from player looking direction
protected const float TARGETING_RAY_RADIUS = 0.25DEPRECATED: "HitZoneSelection"
protected const float TARGETING_RAY_DIST = 5.0DEPRECATED: "HitZoneSelection"
protected const float TARGETING_RAY_DIST_SHORT = 2.0DEPRECATED: "HitZoneSelection"
protected const float RANGE_EXTENDER_SPRINT = 1.35General range extension while in sprint
protected const string DEFAULT_HIT_ZONE = "Torso"DEPRECATED: "HitZoneSelection"
Members 31
protected ref MeleeTargeting m_MeleeTargetingTarget selecting "component"
protected Object m_TargetObjectTargets - types
protected EMeleeTargetType m_TargetTypeDEPRECATED: Was added but never used..?
All potential targets found during most recent TargetSelection
protected Object m_PreviousTargetObjectDIAG_DEVELOPERMain target found during most recent TargetSelection
Show 1 more
, ShowDebugMeleeTarget()protected ref array<Object> m_AllPreviousTargetObjectsDIAG_DEVELOPERAll potential targets found during most recent TargetSelection
Typenames of all directly/preferred targetable objects (1st Pass + 2nd Pass)
Typenames of objects that can be targeted, but are not a priority (3rd Pass)
List of blacklisted damage zone names (cannot use indices due to the possible changes when p3d components are recalculated)
protected DayZPlayerImplement m_DZPlayerParent
protected InventoryItem m_WeaponWeapons - cache
protected int m_WeaponModeWeaponMode used during most recent Update
protected float m_WeaponRangeWeaponRange used during most recent Update
protected bool m_ForceUntargetableMisc - cache
protected bool m_SprintAttackIf most recent attack was a sprint attack
protected bool m_WasHitIf most recent attack was
protected vector m_RayStartStart position of most recent HitZoneSelectionRaycast
protected vector m_RayEndEnd position of most recent HitZoneSelectionRaycast
protected EMeleeHitType m_HitTypeHit type of the most recent attack
protected int m_HitZoneIdxHit result - cache
Show 6 more
, InternalResetTarget(), ResetTarget(), SetHitZoneIdx(), SetTarget(), ShowDebugMeleeTarget(), and Update()protected int m_FinisherTypeprotected string m_HitZoneNameMost recent target HitZone name
Show 4 more
, ResetTarget(), SetTarget(), ShowDebugMeleeTarget(), and TargetSelection()protected vector m_HitPositionWSMost recent target position
Show 7 more
, Init(), InternalResetTarget(), ResetTarget(), SetHitPos(), SetTarget(), ShowDebugMeleeTarget(), and Update()protected int m_PreviousHitZoneIdxDIAG_DEVELOPERMost recent target HitZone index
protected string m_PreviousHitZoneNameDIAG_DEVELOPERMost recent target HitZone name
protected vector m_PreviousHitPositionWSDIAG_DEVELOPERMost recent target position
private int m_DebugForcedFinisherTypeShow 2 more
, Init(), and TrySelectFinisherType()protected ref array<Shape> dbgConeShapes = new array<Shape>()DIAG_DEVELOPERprotected ref array<Shape> dbgTargets = new array<Shape>()DIAG_DEVELOPERprotected ref array<Shape> hitPosShapes = new array<Shape>()DIAG_DEVELOPERMethods 41
void Init(DayZPlayerImplement player)Show 17 more
, m_AllPreviousTargetObjects, m_AllTargetObjects, m_BlacklistedDamageZones, m_DebugForcedFinisherType, m_DZPlayer, m_FinisherType, m_HitPositionWS, m_HitZoneIdx, m_HitZoneName, m_MeleeTargeting, m_NonAlignableObjects, m_SprintAttack, m_TargetableObjects, m_TargetObject, m_TargetType, m_WasHit, and vector.Zerovoid SetHitZoneIdx(int pHitZone)EntityAI GetTargetEntity()void SetTargetObject(Object pTarget)int GetHitZoneIdx()component idx
vector GetHitPos()Show 5 more
, DayZPlayerMeleeFightLogic_LightHeavy.HandleInitialFirearmMelee(), DayZPlayerMeleeFightLogic_LightHeavy.HandleInitialMeleeErc(), DayZPlayerMeleeFightLogic_LightHeavy.HandleProneKick(), DayZPlayerMeleeFightLogic_LightHeavy.HandleSprintAttack(), and DayZPlayerMeleeFightLogic_LightHeavy.IsShortDistance()void SetHitPos(vector pHitPos)int GetFinisherType()void SetFinisherType(int pFinisherType)int GetWeaponMode()void Reset(InventoryItem weapon, EMeleeHitType hitMask, bool wasHitEvent = false)Show 9 more
, m_AllPreviousTargetObjects, m_AllTargetObjects, m_HitType, m_SprintAttack, m_TargetType, m_WasHit, m_Weapon, m_WeaponMode, and m_WeaponRangevoid ResetTarget()void Update(InventoryItem weapon, EMeleeHitType hitMask, bool wasHitEvent = false)void CheckMeleeItem()Store target into input packet
protected int SelectWeaponMode(InventoryItem weapon)Show 2 more
, Class.IsInherited(), and m_HitTypeprotected float GetWeaponRange(InventoryItem weapon, int weaponMode)default bare-hand light attack
Show 2 more
, MeleeCombatData.GetModeRange(), and m_DZPlayerprotected float GetRange()protected float GetAngle()protected void TargetSelection()Show 31 more
, GetAngle(), Human.GetBoneIndexByName(), Object.GetBonePositionWS(), DayZPlayer.GetCurrentCameraTransform(), Object.GetDamageZonePos(), GetFinisherType(), MiscGameplayFunctions.GetHeadingVector(), MeleeTargeting.GetMeleeTargetEx(), Object.GetPosition(), GetRange(), HitZoneSelectionRaycastHelper(), array.Insert(), InternalResetTarget(), new MeleeTargetSettings(), SetTarget(), Math.SqrFloat(), MeleeTargetData.HitComponent, MeleeTargetData.HitPos, m_AllTargetObjects, m_BlacklistedDamageZones, m_DZPlayer, m_ForceUntargetable, m_HitZoneName, m_MeleeTargeting, m_TargetableObjects, m_TargetObject, m_WasHit, MeleeTargetData.Obj, TARGETING_MAX_HEIGHT, TARGETING_MIN_HEIGHT, and TARGETING_RAY_RADIUS_EXprotected int TrySelectFinisherType(InventoryItem weapon, EntityAI target)General condition for finisher attacks
weaponWeaponused in the attacktargetTargetentity
Returns: int - type of finisher (-1 == no finisher)
Show 17 more
, Class.Cast(), Human.CollisionMoveTest(), DetermineSpecificFinisherType(), ZombieBase.GetMindStateSynced(), Object.GetPosition(), Object.GetPosition(), ZombieBase.IsCrawling(), IsEntityBehindEntityInAngle(), PlayerBase.IsInProne(), InventoryItem.IsMeleeFinisher(), Object.IsRuined(), Object.IsWeapon(), m_DebugForcedFinisherType, m_DZPlayer, m_HitType, m_WasHit, and vector.Zerofirearm
protected void InternalResetTarget()Show 3 more
, m_HitZoneName, m_TargetObject, and vector.ZeroShow 2 more
, m_HitZoneName, and m_TargetObjectShow 1 more
, m_TargetableObjectsprotected bool HitZoneSelectionRaycast(out vector hitPos, out int hitZone, out Object target, bool useCamera)Show 14 more
, vector.Dot(), CGame.GetCurrentCameraDirection(), DayZPlayer.GetCurrentCameraTransform(), MiscGameplayFunctions.GetHeadBonePos(), MiscGameplayFunctions.GetHeadingVector(), GetRange(), DayZPlayerImplement.IsInVehicle(), DayZPhysics.RaycastRV(), Math.SqrFloat(), m_DZPlayer, m_ForceUntargetable, m_RayEnd, m_RayStart, and vector.Zeroprotected void HitZoneSelection()DEPRECATED
Show 24 more
, vector.Distance(), set.Get(), CGame.GetCurrentCameraDirection(), Object.GetDamageZoneNameByComponentIndex(), MiscGameplayFunctions.GetHeadBonePos(), Object.GetPosition(), GetWeaponMode(), GetWeaponRange(), Object.IsAnyInherited(), DayZPhysics.RaycastRV(), DEFAULT_HIT_ZONE, m_DZPlayer, m_HitPositionWS, m_HitZoneIdx, m_HitZoneName, m_NonAlignableObjects, m_RayEnd, m_RayEndShort, m_RayStart, m_TargetObject, m_Weapon, TARGETING_RAY_DIST, TARGETING_RAY_DIST_SHORT, and TARGETING_RAY_RADIUSDEPRECATED - New function in MeleeTargeting
not possible to trace when this happens (zero length raycast)
void Debug(InventoryItem weapon, EMeleeHitType hitType)DIAG_DEVELOPERint DebugGetForcedFinisherType()DIAG_DEVELOPERvoid DebugSetForcedFinisherType(int pFinisherType)DIAG_DEVELOPERprotected void ShowDebugMeleeTarget()DIAG_DEVELOPERshows target in DbgUI 'window'
Show 15 more
, HumanCommandMelee2.GetComboCount(), Human.GetCommand_Melee2(), Object.GetDisplayName(), Object.GetDisplayName(), Object.GetPosition(), DbgUI.Text(), m_DZPlayer, m_HitPositionWS, m_HitZoneIdx, m_HitZoneName, m_PreviousHitPositionWS, m_PreviousHitZoneIdx, m_PreviousHitZoneName, m_PreviousTargetObject, and m_TargetObjectprotected void DrawDebugTargets()DIAG_DEVELOPERshows debug sphere above the target
Show 2 more
, m_PreviousTargetObject, and m_TargetObjectprotected void DrawDebugTargetsHelper(array<Object> allTargets, Object target, int colorMainTarget, int colorTarget)DIAG_DEVELOPERShow 4 more
, Object.GetPosition(), array.Insert(), dbgTargets, and m_TargetObjectprotected void DrawDebugMeleeHitPosition()DIAG_DEVELOPERShow 4 more
, m_HitPositionWS, m_PreviousHitPositionWS, m_PreviousTargetObject, and m_TargetObjectprotected void DrawDebugMeleeCone()DIAG_DEVELOPERprotected void DrawDebugBlockCone(float angle, int color)DIAG_DEVELOPERShow 7 more
, Object.GetPosition(), array.InsertArray(), vector.Normalize(), dbgConeShapes, Math.DEG2RAD, m_DZPlayer, and Math.PI_HALFprotected void CleanAllDebugShapes()DIAG_DEVELOPERprotected void CleanupDebugShapes(array<Shape> shapes)DIAG_DEVELOPER