Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
|
Go to the source code of this file.
Enumerations | |
enum | EFightLogicCooldownCategory { EVADE = 0 } |
Light / Heavy punches. More... | |
Functions | |
void | DayZPlayerMeleeFightLogic_LightHeavy (DayZPlayerImplement player) |
void | Init (DayZPlayerImplement player) |
void | ~DayZPlayerMeleeFightLogic_LightHeavy () |
bool | IsInBlock () |
void | SetBlock (bool block) |
bool | IsEvading () |
bool | GetCurrentHitType () |
bool | CanFight () |
protected void | RegisterCooldowns () |
protected EMeleeHitType | GetAttackTypeFromInputs (HumanInputController pInputs) |
protected EMeleeHitType | GetAttackTypeByWeaponAttachments (EntityAI pEntity) |
protected float | GetAttackTypeByDistanceToTarget (EntityAI pTarget, EMeleeTargetType pTargetType=EMeleeTargetType.ALIGNABLE) |
bool | HandleFightLogic (int pCurrentCommandID, HumanInputController pInputs, EntityAI pEntityInHands, HumanMovementState pMovementState, out bool pContinueAttack) |
protected bool | HandleHitEvent (int pCurrentCommandID, HumanInputController pInputs, InventoryItem itemInHands, HumanMovementState pMovementState, out bool pContinueAttack) |
Handle the event that our melee hit something. More... | |
protected bool | HandleInitialFirearmMelee (int pCurrentCommandID, HumanInputController pInputs, InventoryItem itemInHands, HumanMovementState pMovementState, out bool pContinueAttack) |
NOTE: Only singular (or first) hits, combo attacks are handled in combo. More... | |
protected bool | HandleInitialMeleeErc (int pCurrentCommandID, HumanInputController pInputs, InventoryItem itemInHands, HumanMovementState pMovementState, out bool pContinueAttack) |
First attack in raised erc (light or heavy if modifier is used). Also added support for finishers. More... | |
protected bool | HandleProneKick (int pCurrentCommandID, HumanInputController pInputs, InventoryItem itemInHands, HumanMovementState pMovementState, out bool pContinueAttack) |
kick from raised pne More... | |
protected bool | HandleSprintAttack (int pCurrentCommandID, HumanInputController pInputs, InventoryItem itemInHands, HumanMovementState pMovementState, out bool pContinueAttack) |
sprint attack in erc stance More... | |
protected bool | HandleComboHit (int pCurrentCommandID, HumanInputController pInputs, InventoryItem itemInHands, HumanMovementState pMovementState, out bool pContinueAttack) |
combo hits - when we are already in Melee command and clicking UseButton More... | |
protected void | EvaluateHit (InventoryItem weapon) |
protected void | EvaluateHit_Player (InventoryItem weapon, Object target) |
protected void | EvaluateHit_Infected (InventoryItem weapon, Object target) |
protected bool | EvaluateFinisherAttack (InventoryItem weapon, Object target) |
Check and evaluate stealth kill, if applicable. More... | |
protected void | EvaluateHit_Common (InventoryItem weapon, Object target, bool forcedDummy=false, int forcedWeaponMode=-1) |
protected void | EvaluateHit_NonAlignableObjects (InventoryItem weapon, Object target) |
bool | WeaponDestroyedCheck (InventoryItem weapon, out string ammo) |
protected void | GetTargetData (out EntityAI target, out EMeleeTargetType targetType) |
protected bool | DummyHitSelector (EMeleeHitType hitType, out string ammoType) |
evaluation of hit player vs. player More... | |
protected bool | IsBehindEntity (int angle, DayZPlayer source, Object target) |
DEPRECATED - moved into DayZPlayerImplementMeleeCombat. More... | |
protected void | SetCooldown (float time, EFightLogicCooldownCategory cooldownCategory) |
protected void | ResetCooldown (EFightLogicCooldownCategory cooldownCategory) |
protected void | EnableControls () |
protected void | DisableControls () |
protected void | DamageHands (DayZPlayer DZPlayer, ClothingBase gloves, InventoryItem itemInHands) |
int | GetFinisherType (InventoryItem weapon, EntityAI target) |
DEPRECATED. More... | |
bool | IsHitTypeFinisher (int type) |
DEPRECATED. More... | |
int | DetermineFinisherAnimation (int finisher_type) |
Picks a specific finisher animation. Not used for mounted bayonet stabs. More... | |
string | DetermineFinisherAmmo (int finisher_type) |
Picks a specific finisher ammo fot the hit type. This gets synchronized and guides further behaviour of the target. More... | |
int | DetermineSpecificFinisherType (ItemBase weapon, int component) |
DEPRECATED. More... | |
protected bool | IsShortDistance (EntityAI pTarget, float pDistanceSq) |
Variables | |
enum EFightLogicCooldownCategory | EVADE_COOLDOWN = 0.5 |
cooldown timers settings More... | |
const float | CLOSE_TARGET_DISTANCE = 1.5 |
const string | DUMMY_LIGHT_AMMO = "Dummy_Light" |
dummy ammo types More... | |
const string | DUMMY_HEAVY_AMMO = "Dummy_Heavy" |
protected PlayerBase | m_Player |
protected ref DayZPlayerImplementMeleeCombat | m_MeleeCombat |
protected EMeleeHitType | m_HitType |
protected ref map< int, ref Timer > | m_CooldownTimers |
protected Mission | m_Mission |
protected bool | m_IsInBlock |
protected bool | m_IsEvading |
protected bool | m_IsInComboRange |
protected bool | m_WasPreviousHitProcessed |
protected DayZPlayerImplement | m_DZPlayer |
DEPRECATED. More... | |
protected bool | m_IsFinisher |
Light / Heavy punches.
Enumerator | |
---|---|
EVADE |
Definition at line 2 of file dayzplayermeleefightlogic_lightheavy.c.
bool CanFight | ( | ) |
Definition at line 73 of file dayzplayermeleefightlogic_lightheavy.c.
protected void DamageHands | ( | DayZPlayer | DZPlayer, |
ClothingBase | gloves, | ||
InventoryItem | itemInHands | ||
) |
Definition at line 814 of file dayzplayermeleefightlogic_lightheavy.c.
void DayZPlayerMeleeFightLogic_LightHeavy | ( | DayZPlayerImplement | player | ) |
Definition at line 31 of file dayzplayermeleefightlogic_lightheavy.c.
Picks a specific finisher ammo fot the hit type. This gets synchronized and guides further behaviour of the target.
Definition at line 931 of file dayzplayermeleefightlogic_lightheavy.c.
Picks a specific finisher animation. Not used for mounted bayonet stabs.
Definition at line 912 of file dayzplayermeleefightlogic_lightheavy.c.
DEPRECATED.
Definition at line 950 of file dayzplayermeleefightlogic_lightheavy.c.
protected void DisableControls | ( | ) |
protected bool DummyHitSelector | ( | EMeleeHitType | hitType, |
out string | ammoType | ||
) |
evaluation of hit player vs. player
in case of kick (on back or push from erc) change the ammo type to dummy
Definition at line 766 of file dayzplayermeleefightlogic_lightheavy.c.
protected void EnableControls | ( | ) |
protected bool EvaluateFinisherAttack | ( | InventoryItem | weapon, |
Object | target | ||
) |
Check and evaluate stealth kill, if applicable.
Definition at line 641 of file dayzplayermeleefightlogic_lightheavy.c.
protected void EvaluateHit | ( | InventoryItem | weapon | ) |
Definition at line 573 of file dayzplayermeleefightlogic_lightheavy.c.
protected void EvaluateHit_Common | ( | InventoryItem | weapon, |
Object | target, | ||
bool | forcedDummy = false , |
||
int | forcedWeaponMode = -1 |
||
) |
check if we need to use dummy hit
normal hit with applied damage to targeted component
play hit animation for dummy hits
override hit pos by pos defined in type
Definition at line 656 of file dayzplayermeleefightlogic_lightheavy.c.
protected void EvaluateHit_Infected | ( | InventoryItem | weapon, |
Object | target | ||
) |
Definition at line 633 of file dayzplayermeleefightlogic_lightheavy.c.
protected void EvaluateHit_NonAlignableObjects | ( | InventoryItem | weapon, |
Object | target | ||
) |
Definition at line 701 of file dayzplayermeleefightlogic_lightheavy.c.
protected void EvaluateHit_Player | ( | InventoryItem | weapon, |
Object | target | ||
) |
Melee Hit/Impact modifiers
if the oponnent is in Melee Block shift the damage down
Definition at line 600 of file dayzplayermeleefightlogic_lightheavy.c.
protected float GetAttackTypeByDistanceToTarget | ( | EntityAI | pTarget, |
EMeleeTargetType | pTargetType = EMeleeTargetType.ALIGNABLE |
||
) |
target in short distance - in place attack
target is far from the player - forward movement attack
Definition at line 120 of file dayzplayermeleefightlogic_lightheavy.c.
protected EMeleeHitType GetAttackTypeByWeaponAttachments | ( | EntityAI | pEntity | ) |
use stabbing if the bayonet/knife is attached to firearm
Definition at line 100 of file dayzplayermeleefightlogic_lightheavy.c.
protected EMeleeHitType GetAttackTypeFromInputs | ( | HumanInputController | pInputs | ) |
Definition at line 90 of file dayzplayermeleefightlogic_lightheavy.c.
bool GetCurrentHitType | ( | ) |
Definition at line 68 of file dayzplayermeleefightlogic_lightheavy.c.
int GetFinisherType | ( | InventoryItem | weapon, |
EntityAI | target | ||
) |
DEPRECATED.
Definition at line 900 of file dayzplayermeleefightlogic_lightheavy.c.
protected void GetTargetData | ( | out EntityAI | target, |
out EMeleeTargetType | targetType | ||
) |
default
nullify target for nonalignable objects (big objects)
Definition at line 742 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool HandleComboHit | ( | int | pCurrentCommandID, |
HumanInputController | pInputs, | ||
InventoryItem | itemInHands, | ||
HumanMovementState | pMovementState, | ||
out bool | pContinueAttack | ||
) |
combo hits - when we are already in Melee command and clicking UseButton
no suitable attack - skip that
No combos for the finisher command
select if the next attack will light or heavy (based on input/attachment modifier)
targetting
wait for the previous hit commit before hitting again
continue 'combo' - left hand attacks
broken legs shock
stamina depletion per attack
Definition at line 501 of file dayzplayermeleefightlogic_lightheavy.c.
bool HandleFightLogic | ( | int | pCurrentCommandID, |
HumanInputController | pInputs, | ||
EntityAI | pEntityInHands, | ||
HumanMovementState | pMovementState, | ||
out bool | pContinueAttack | ||
) |
Check if we need to damage
Actually pressing a button to start a melee attack
do not perform attacks when blocking
if the item in hands cannot be used as melee weapon
Currently not performing any attacks, so here we start the initial
melee with firearm
first attack in raised erc (light or heavy if modifier is used). Also added support for finishers
kick from raised pne
sprint attack in erc stance
combo hits - when we are already in Melee command and clicking UseButton
evade and blocking logic
evades in raised erc stance while moving
not enough stamina to do evades
stand up when crouching and raised pressed
blocks in raised erc/pro stance (bare hand or with melee weapon only)
Definition at line 137 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool HandleHitEvent | ( | int | pCurrentCommandID, |
HumanInputController | pInputs, | ||
InventoryItem | itemInHands, | ||
HumanMovementState | pMovementState, | ||
out bool | pContinueAttack | ||
) |
Handle the event that our melee hit something.
Check if we need to damage
on anim event Hit received
re-target (enemy can have moved out of range or disappeared)
evaluate hit - selection of cfg 'ammo' type
Definition at line 283 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool HandleInitialFirearmMelee | ( | int | pCurrentCommandID, |
HumanInputController | pInputs, | ||
InventoryItem | itemInHands, | ||
HumanMovementState | pMovementState, | ||
out bool | pContinueAttack | ||
) |
NOTE: Only singular (or first) hits, combo attacks are handled in combo.
don't allow bash to interfere with actions like chambering or ejecting bullets
perform firearm melee from raised erect or continue with attack after character stand up from crouch
exit if there is no suitable attack
char stand up when performing firearm melee from crouch
Definition at line 338 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool HandleInitialMeleeErc | ( | int | pCurrentCommandID, |
HumanInputController | pInputs, | ||
InventoryItem | itemInHands, | ||
HumanMovementState | pMovementState, | ||
out bool | pContinueAttack | ||
) |
First attack in raised erc (light or heavy if modifier is used). Also added support for finishers.
Definition at line 384 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool HandleProneKick | ( | int | pCurrentCommandID, |
HumanInputController | pInputs, | ||
InventoryItem | itemInHands, | ||
HumanMovementState | pMovementState, | ||
out bool | pContinueAttack | ||
) |
kick from raised pne
check if player is on back (situation where the player is raised in prone and on back is not in anim graph)
Definition at line 450 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool HandleSprintAttack | ( | int | pCurrentCommandID, |
HumanInputController | pInputs, | ||
InventoryItem | itemInHands, | ||
HumanMovementState | pMovementState, | ||
out bool | pContinueAttack | ||
) |
sprint attack in erc stance
targetting
command
Definition at line 480 of file dayzplayermeleefightlogic_lightheavy.c.
void Init | ( | DayZPlayerImplement | player | ) |
Definition at line 36 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool IsBehindEntity | ( | int | angle, |
DayZPlayer | source, | ||
Object | target | ||
) |
DEPRECATED - moved into DayZPlayerImplementMeleeCombat.
Definition at line 783 of file dayzplayermeleefightlogic_lightheavy.c.
bool IsEvading | ( | ) |
Definition at line 63 of file dayzplayermeleefightlogic_lightheavy.c.
DEPRECATED.
Definition at line 906 of file dayzplayermeleefightlogic_lightheavy.c.
bool IsInBlock | ( | ) |
Definition at line 53 of file dayzplayermeleefightlogic_lightheavy.c.
Definition at line 955 of file dayzplayermeleefightlogic_lightheavy.c.
protected void RegisterCooldowns | ( | ) |
Definition at line 84 of file dayzplayermeleefightlogic_lightheavy.c.
protected void ResetCooldown | ( | EFightLogicCooldownCategory | cooldownCategory | ) |
Definition at line 801 of file dayzplayermeleefightlogic_lightheavy.c.
void SetBlock | ( | bool | block | ) |
Definition at line 58 of file dayzplayermeleefightlogic_lightheavy.c.
protected void SetCooldown | ( | float | time, |
EFightLogicCooldownCategory | cooldownCategory | ||
) |
stops currently running cooldown timer (for specific category)
param for ResetCooldown
Definition at line 788 of file dayzplayermeleefightlogic_lightheavy.c.
bool WeaponDestroyedCheck | ( | InventoryItem | weapon, |
out string | ammo | ||
) |
Definition at line 718 of file dayzplayermeleefightlogic_lightheavy.c.
void ~DayZPlayerMeleeFightLogic_LightHeavy | ( | ) |
Definition at line 51 of file dayzplayermeleefightlogic_lightheavy.c.
const float CLOSE_TARGET_DISTANCE = 1.5 |
Definition at line 13 of file dayzplayermeleefightlogic_lightheavy.c.
const string DUMMY_HEAVY_AMMO = "Dummy_Heavy" |
Definition at line 17 of file dayzplayermeleefightlogic_lightheavy.c.
const string DUMMY_LIGHT_AMMO = "Dummy_Light" |
dummy ammo types
Definition at line 16 of file dayzplayermeleefightlogic_lightheavy.c.
enum EFightLogicCooldownCategory EVADE_COOLDOWN = 0.5 |
cooldown timers settings
Definition at line 22 of file dayzplayermeleefightlogic_lightheavy.c.
protected DayZPlayerImplement m_DZPlayer |
DEPRECATED.
Definition at line 961 of file dayzplayermeleefightlogic_lightheavy.c.
protected EMeleeHitType m_HitType |
Definition at line 21 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool m_IsEvading |
Definition at line 26 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool m_IsFinisher |
Definition at line 962 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool m_IsInBlock |
Definition at line 25 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool m_IsInComboRange |
Definition at line 28 of file dayzplayermeleefightlogic_lightheavy.c.
protected ref DayZPlayerImplementMeleeCombat m_MeleeCombat |
Definition at line 20 of file dayzplayermeleefightlogic_lightheavy.c.
protected Mission m_Mission |
Definition at line 23 of file dayzplayermeleefightlogic_lightheavy.c.
protected PlayerBase m_Player |
Definition at line 19 of file dayzplayermeleefightlogic_lightheavy.c.
protected bool m_WasPreviousHitProcessed |
Definition at line 29 of file dayzplayermeleefightlogic_lightheavy.c.