DIFF

class DayZPlayerImplementMeleeCombatSource

Constructors 2

void DayZPlayerImplementMeleeCombat(DayZPlayerImplement player)
References Init()
void ~DayZPlayerImplementMeleeCombat()

Constants 11

protected const float TARGETING_ANGLE_NORMAL = 30.0

Target selection settings

Referenced by GetAngle()
protected const float TARGETING_ANGLE_SPRINT = 15.0

Second Pass: Half angle of cone during sprint

Referenced by GetAngle()
protected const float TARGETING_MIN_HEIGHT = -2.0

Second Pass: How deep the cone goes in meters from player position

Referenced by TargetSelection()
protected const float TARGETING_MAX_HEIGHT = 2.0

Second Pass: How high the cone goes in meters from player position

Referenced by TargetSelection()
protected const float TARGETING_RAY_RADIUS_EX = 0.5

Second Pass: Max distance from ray projected from player looking direction

Referenced by TargetSelection()
protected const float TARGETING_RAY_RADIUS = 0.25

DEPRECATED: "HitZoneSelection"

Referenced by HitZoneSelection()
protected const float TARGETING_RAY_DIST = 5.0

DEPRECATED: "HitZoneSelection"

Referenced by HitZoneSelection()
protected const float TARGETING_RAY_DIST_SHORT = 2.0

DEPRECATED: "HitZoneSelection"

Referenced by HitZoneSelection()
protected const float RANGE_EXTENDER_NORMAL = 0.65

General range extension

Referenced by GetRange()
protected const float RANGE_EXTENDER_SPRINT = 1.35

General range extension while in sprint

protected const string DEFAULT_HIT_ZONE = "Torso"

DEPRECATED: "HitZoneSelection"

Referenced by HitZoneSelection()

Members 31

protected ref MeleeTargeting m_MeleeTargeting

Target selecting "component"

Referenced by Init(), and TargetSelection()
protected EMeleeTargetType m_TargetType

DEPRECATED: Was added but never used..?

Referenced by Init(), and Reset()
protected ref array<Object> m_AllTargetObjects

All potential targets found during most recent TargetSelection

Referenced by DrawDebugTargets(), Init(), Reset()
Show 1 more, TargetSelection()
protected Object m_PreviousTargetObjectDIAG_DEVELOPER

Main target found during most recent TargetSelection

protected ref array<Object> m_AllPreviousTargetObjectsDIAG_DEVELOPER

All potential targets found during most recent TargetSelection

Referenced by DrawDebugTargets(), Init(), and Reset()
protected ref array<typename> m_TargetableObjects

Typenames of all directly/preferred targetable objects (1st Pass + 2nd Pass)

protected ref array<typename> m_NonAlignableObjects

Typenames of objects that can be targeted, but are not a priority (3rd Pass)

protected ref array<string> m_BlacklistedDamageZones

List of blacklisted damage zone names (cannot use indices due to the possible changes when p3d components are recalculated)

Referenced by Init(), and TargetSelection()
protected InventoryItem m_Weapon

Weapons - cache

protected int m_WeaponMode

WeaponMode used during most recent Update

Referenced by GetWeaponMode(), and Reset()
protected float m_WeaponRange

WeaponRange used during most recent Update

Referenced by GetRange(), and Reset()
protected bool m_ForceUntargetable

Misc - cache

protected bool m_SprintAttack

If most recent attack was a sprint attack

Referenced by GetAngle(), Init(), and Reset()
protected bool m_WasHit

If most recent attack was

Referenced by Init(), Reset(), TargetSelection()
Show 1 more, TrySelectFinisherType()
protected vector m_RayStart

Start position of most recent HitZoneSelectionRaycast

protected vector m_RayEnd

End position of most recent HitZoneSelectionRaycast

protected vector m_RayEndShort

DEPRECATED: "HitZoneSelection"

Referenced by HitZoneSelection()
protected EMeleeHitType m_HitType

Hit type of the most recent attack

Referenced by GetHitType(), Reset(), SelectWeaponMode()
Show 1 more, TrySelectFinisherType()
protected int m_HitZoneIdx

Hit result - cache

protected int m_FinisherType
Referenced by GetFinisherType(), Init(), SetFinisherType()
Show 1 more, Update()
protected string m_HitZoneName

Most recent target HitZone name

protected vector m_HitPositionWS

Most recent target position

protected int m_PreviousHitZoneIdxDIAG_DEVELOPER

Most recent target HitZone index

protected string m_PreviousHitZoneNameDIAG_DEVELOPER

Most recent target HitZone name

protected vector m_PreviousHitPositionWSDIAG_DEVELOPER

Most recent target position

private int m_DebugForcedFinisherType
protected ref array<Shape> dbgConeShapes = new array<Shape>()DIAG_DEVELOPER
protected ref array<Shape> dbgTargets = new array<Shape>()DIAG_DEVELOPER
protected ref array<Shape> hitPosShapes = new array<Shape>()DIAG_DEVELOPER

Methods 41

EMeleeHitType GetHitType()
References m_HitType
void SetHitZoneIdx(int pHitZone)
References m_HitZoneIdx
void SetTargetObject(Object pTarget)
References m_TargetObject
void SetHitPos(vector pHitPos)
References m_HitPositionWS
void SetFinisherType(int pFinisherType)
References m_FinisherType
protected float GetWeaponRange(InventoryItem weapon, int weaponMode)

default bare-hand light attack

Referenced by HitZoneSelection(), and Reset()
protected void InternalResetTarget()
Referenced by ResetTarget(), and TargetSelection()
protected void SetTarget(Object obj, vector hitPos, int hitZone)
Referenced by TargetSelection()
protected bool CanObjectBeTargeted(Object obj, bool checkNonAligneAble = false)
Referenced by TargetSelection()
protected bool HitZoneSelectionRaycastHelper(out vector hitPos, out int hitZone, out Object target)
Referenced by TargetSelection()
private bool IsEntityBehindEntityInAngle(EntityAI source, EntityAI target, float angle)

not possible to trace when this happens (zero length raycast)

void DebugSetForcedFinisherType(int pFinisherType)DIAG_DEVELOPER
protected void DrawDebugTargets()DIAG_DEVELOPER

shows debug sphere above the target

Referenced by Debug()
protected void DrawDebugTargetsHelper(array<Object> allTargets, Object target, int colorMainTarget, int colorTarget)DIAG_DEVELOPER
Referenced by DrawDebugTargets()
protected void DrawDebugMeleeHitPosition()DIAG_DEVELOPER
Referenced by Debug()
protected void CleanAllDebugShapes()DIAG_DEVELOPER
References CleanupDebugShapes(), dbgConeShapes, dbgTargets
Show 1 more, hitPosShapes
Referenced by Debug()
protected void CleanupDebugShapes(array<Shape> shapes)DIAG_DEVELOPER
Referenced by CleanAllDebugShapes()