DayZ 1.24
|
Go to the source code of this file.
Enumerations | |
enum | EMeleeHitType { NONE = -1 , LIGHT , HEAVY , SPRINT , KICK , FINISHER_LIVERSTAB , FINISHER_NECKSTAB , FINISHER_GENERIC , WPN_HIT , WPN_HIT_BUTTSTOCK , WPN_STAB , WPN_STAB_FINISHER } |
Variables | |
enum EMeleeHitType | TARGETING_ANGLE_NORMAL = 30.0 |
Target selection settings. | |
const float | TARGETING_ANGLE_SPRINT = 15.0 |
Second Pass: Half angle of cone during sprint. | |
const float | TARGETING_MIN_HEIGHT = -2.0 |
Second Pass: How deep the cone goes in meters from player position. | |
const float | TARGETING_MAX_HEIGHT = 2.0 |
Second Pass: How high the cone goes in meters from player position. | |
const float | TARGETING_RAY_RADIUS_EX = 0.5 |
Second Pass: Max distance from ray projected from player looking direction. | |
const float | TARGETING_RAY_RADIUS = 0.25 |
DEPRECATED: "HitZoneSelection". | |
const float | TARGETING_RAY_DIST = 5.0 |
DEPRECATED: "HitZoneSelection". | |
const float | TARGETING_RAY_DIST_SHORT = 2.0 |
DEPRECATED: "HitZoneSelection". | |
const float | RANGE_EXTENDER_NORMAL = 0.65 |
General range extension. | |
const float | RANGE_EXTENDER_SPRINT = 1.35 |
General range extension while in sprint. | |
const string | DEFAULT_HIT_ZONE = "Torso" |
DEPRECATED: "HitZoneSelection". | |
ref MeleeTargeting | m_MeleeTargeting |
Target selecting "component". | |
Object | m_TargetObject |
Targets - types. | |
EMeleeTargetType | m_TargetType |
DEPRECATED: Was added but never used..? | |
ref array< Object > | m_AllTargetObjects |
All potential targets found during most recent TargetSelection. | |
ref array< typename > | m_TargetableObjects |
Typenames of all directly/preferred targetable objects (1st Pass + 2nd Pass) | |
ref array< typename > | m_NonAlignableObjects |
Typenames of objects that can be targeted, but are not a priority (3rd Pass) | |
ref array< string > | m_BlacklistedDamageZones |
List of blacklisted damage zone names (cannot use indices due to the possible changes when p3d components are recalculated) | |
DayZPlayerImplement | m_DZPlayer |
Parent. | |
InventoryItem | m_Weapon |
Weapons - cache. | |
int | m_WeaponMode |
WeaponMode used during most recent Update. | |
float | m_WeaponRange |
WeaponRange used during most recent Update. | |
bool | m_ForceUntargetable |
Misc - cache. | |
bool | m_SprintAttack |
If most recent attack was a sprint attack. | |
bool | m_WasHit |
If most recent attack was. | |
vector | m_RayStart |
Start position of most recent HitZoneSelectionRaycast. | |
vector | m_RayEnd |
End position of most recent HitZoneSelectionRaycast. | |
vector | m_RayEndShort |
DEPRECATED: "HitZoneSelection". | |
EMeleeHitType | m_HitType |
Hit type of the most recent attack. | |
int | m_HitZoneIdx |
Hit result - cache. | |
int | m_FinisherType |
string | m_HitZoneName |
Most recent target HitZone name. | |
vector | m_HitPositionWS |
Most recent target position. | |
int | m_DebugForcedFinisherType |
Enumerator | |
---|---|
NONE | |
LIGHT | |
HEAVY | |
SPRINT | |
KICK | |
FINISHER_LIVERSTAB | |
FINISHER_NECKSTAB | |
FINISHER_GENERIC | |
WPN_HIT | |
WPN_HIT_BUTTSTOCK | |
WPN_STAB | |
WPN_STAB_FINISHER |
Definition at line 1 of file DayZPlayerImplementMeleeCombat.c.
Definition at line 508 of file DayZPlayerImplementMeleeCombat.c.
References m_NonAlignableObjects, and m_TargetableObjects.
Referenced by TargetSelection().
|
private |
Definition at line 248 of file DayZPlayerImplementMeleeCombat.c.
References GetWeaponMode(), and m_Weapon.
|
private |
Definition at line 90 of file DayZPlayerImplementMeleeCombat.c.
References Init().
Referenced by DayZPlayer::DayZPlayerImplement().
Definition at line 468 of file DayZPlayerImplementMeleeCombat.c.
References Math::Lerp(), m_DebugForcedFinisherType, m_DZPlayer, and Math::Round().
Referenced by TrySelectFinisherType().
|
protected |
Definition at line 322 of file DayZPlayerImplementMeleeCombat.c.
References m_SprintAttack, TARGETING_ANGLE_NORMAL, and TARGETING_ANGLE_SPRINT.
Referenced by TargetSelection().
|
private |
Definition at line 177 of file DayZPlayerImplementMeleeCombat.c.
References m_FinisherType.
Referenced by TargetSelection().
|
private |
Definition at line 167 of file DayZPlayerImplementMeleeCombat.c.
References m_HitPositionWS.
|
private |
Definition at line 141 of file DayZPlayerImplementMeleeCombat.c.
References m_HitType.
|
private |
component idx
Definition at line 162 of file DayZPlayerImplementMeleeCombat.c.
References m_HitZoneIdx.
|
protected |
Definition at line 317 of file DayZPlayerImplementMeleeCombat.c.
References m_WeaponRange, and RANGE_EXTENDER_NORMAL.
Referenced by HitZoneSelectionRaycast(), and TargetSelection().
|
private |
Definition at line 151 of file DayZPlayerImplementMeleeCombat.c.
References m_TargetObject.
Referenced by Update().
|
private |
Definition at line 187 of file DayZPlayerImplementMeleeCombat.c.
References m_WeaponMode.
Referenced by CheckMeleeItem(), and HitZoneSelection().
|
protected |
Definition at line 309 of file DayZPlayerImplementMeleeCombat.c.
References m_DZPlayer.
Referenced by HitZoneSelection(), and Reset().
|
protected |
DEPRECATED.
make sure we are in range of the current weapon;
2d only
just for building and transports (big objects)
if no object in cone, set this object from raycast for these special cases
Definition at line 580 of file DayZPlayerImplementMeleeCombat.c.
References DEFAULT_HIT_ZONE, vector::Distance(), GetGame(), GetWeaponMode(), GetWeaponRange(), m_DZPlayer, m_HitPositionWS, m_HitZoneIdx, m_HitZoneName, m_NonAlignableObjects, m_RayEnd, m_RayEndShort, m_RayStart, m_TargetObject, m_Weapon, DayZPhysics::RaycastRV(), TARGETING_RAY_DIST, TARGETING_RAY_DIST_SHORT, and TARGETING_RAY_RADIUS.
|
protected |
Prevents targeting of objects behind player
Opponent is inside car - targeting range is shorter in that case
Definition at line 522 of file DayZPlayerImplementMeleeCombat.c.
References vector::DistanceSq(), vector::Dot(), GetGame(), GetRange(), m_DZPlayer, m_ForceUntargetable, m_RayEnd, m_RayStart, DayZPhysics::RaycastRV(), Math::SqrFloat(), and vector::Zero.
Referenced by HitZoneSelectionRaycastHelper().
|
protected |
Definition at line 513 of file DayZPlayerImplementMeleeCombat.c.
References HitZoneSelectionRaycast().
Referenced by TargetSelection().
|
private |
Definition at line 95 of file DayZPlayerImplementMeleeCombat.c.
References 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::Zero.
|
protected |
Definition at line 488 of file DayZPlayerImplementMeleeCombat.c.
References m_HitPositionWS, m_HitZoneIdx, m_HitZoneName, m_TargetObject, SetFinisherType(), and vector::Zero.
Referenced by ResetTarget(), and TargetSelection().
Definition at line 668 of file DayZPlayerImplementMeleeCombat.c.
References Math::Acos(), Class::CastTo(), vector::Dot(), Math::RAD2DEG, and Vector().
Referenced by TrySelectFinisherType().
DEPRECATED - New function in MeleeTargeting.
not possible to trace when this happens (zero length raycast)
Definition at line 644 of file DayZPlayerImplementMeleeCombat.c.
References vector::Distance(), m_DZPlayer, and DayZPhysics::RayCastBullet().
|
private |
Definition at line 192 of file DayZPlayerImplementMeleeCombat.c.
References GetWeaponRange(), m_AllTargetObjects, m_HitType, m_SprintAttack, m_TargetType, m_WasHit, m_Weapon, m_WeaponMode, m_WeaponRange, and SelectWeaponMode().
|
private |
Definition at line 208 of file DayZPlayerImplementMeleeCombat.c.
References InternalResetTarget(), m_HitPositionWS, m_HitZoneIdx, m_HitZoneName, and m_TargetObject.
|
protected |
melee with firearm
melee weapon attacks - gets mode from the item
bare hand melee mode selection
default bare-hand light attack
Definition at line 265 of file DayZPlayerImplementMeleeCombat.c.
References m_HitType.
Referenced by Reset().
Definition at line 182 of file DayZPlayerImplementMeleeCombat.c.
References m_FinisherType.
Referenced by InternalResetTarget(), and Update().
Definition at line 172 of file DayZPlayerImplementMeleeCombat.c.
References m_HitPositionWS.
Definition at line 146 of file DayZPlayerImplementMeleeCombat.c.
References m_HitZoneIdx.
Definition at line 497 of file DayZPlayerImplementMeleeCombat.c.
References m_HitPositionWS, m_HitZoneIdx, m_HitZoneName, and m_TargetObject.
Referenced by TargetSelection().
Definition at line 156 of file DayZPlayerImplementMeleeCombat.c.
References m_TargetObject.
|
protected |
Definition at line 330 of file DayZPlayerImplementMeleeCombat.c.
References CanObjectBeTargeted(), vector::DistanceSq(), GetAngle(), GetFinisherType(), GetRange(), HitZoneSelectionRaycastHelper(), InternalResetTarget(), m_AllTargetObjects, m_BlacklistedDamageZones, m_DZPlayer, m_ForceUntargetable, m_HitZoneName, m_MeleeTargeting, m_TargetableObjects, m_TargetObject, m_WasHit, MeleeTargetSettings(), SetTarget(), Math::SqrFloat(), TARGETING_MAX_HEIGHT, TARGETING_MIN_HEIGHT, and TARGETING_RAY_RADIUS_EX.
Referenced by Update().
|
protected |
General condition for finisher attacks.
weapon | Weapon used in the attack |
target | Target entity |
int
- type of finisher (-1 == no finisher) perform only for finisher suitable weapons
check if attacker is in right pos and angle against victim
Check if the infected is aware of the player
prone checks
firearm
Definition at line 413 of file DayZPlayerImplementMeleeCombat.c.
References DetermineSpecificFinisherType(), IsEntityBehindEntityInAngle(), m_DebugForcedFinisherType, m_DZPlayer, m_HitType, m_WasHit, and vector::Zero.
Referenced by Update().
|
private |
Store target into input packet
Definition at line 220 of file DayZPlayerImplementMeleeCombat.c.
References ScriptInputUserData::CanStoreInputUserData(), GetGame(), GetTargetEntity(), INPUT_UDT_MELEE_TARGET, m_FinisherType, m_HitPositionWS, m_HitZoneIdx, m_TargetObject, Reset(), SetFinisherType(), TargetSelection(), and TrySelectFinisherType().
|
private |
Definition at line 135 of file DayZPlayerImplementMeleeCombat.c.
DEPRECATED: "HitZoneSelection".
Definition at line 34 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelection().
All potential targets found during most recent TargetSelection.
Definition at line 42 of file DayZPlayerImplementMeleeCombat.c.
Referenced by DayZInfected::ChaseAttackLogic(), DayZInfected::FightAttackLogic(), DayZInfected::Init(), Init(), Reset(), and TargetSelection().
List of blacklisted damage zone names (cannot use indices due to the possible changes when p3d components are recalculated)
Definition at line 51 of file DayZPlayerImplementMeleeCombat.c.
Referenced by Init(), and TargetSelection().
|
private |
Definition at line 84 of file DayZPlayerImplementMeleeCombat.c.
Referenced by DetermineSpecificFinisherType(), Init(), and TrySelectFinisherType().
|
protected |
Parent.
Player executing the melee
Definition at line 54 of file DayZPlayerImplementMeleeCombat.c.
Referenced by DetermineSpecificFinisherType(), GetWeaponRange(), HitZoneSelection(), HitZoneSelectionRaycast(), Init(), IsObstructed(), TargetSelection(), and TrySelectFinisherType().
|
protected |
Definition at line 74 of file DayZPlayerImplementMeleeCombat.c.
Referenced by GetFinisherType(), Init(), SetFinisherType(), and Update().
|
protected |
Misc - cache.
Forcing current target as untargetable
Definition at line 62 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelectionRaycast(), and TargetSelection().
|
protected |
Most recent target position.
Definition at line 76 of file DayZPlayerImplementMeleeCombat.c.
Referenced by GetHitPos(), HitZoneSelection(), Init(), InternalResetTarget(), ResetTarget(), SetHitPos(), SetTarget(), and Update().
|
protected |
Hit type of the most recent attack.
Definition at line 70 of file DayZPlayerImplementMeleeCombat.c.
Referenced by DamageHands(), EvaluateHit_Common(), GetCurrentHitType(), GetHitType(), HandleComboHit(), HandleHitEvent(), HandleInitialFirearmMelee(), HandleInitialMeleeErc(), HandleProneKick(), HandleSprintAttack(), Init(), Reset(), SelectWeaponMode(), and TrySelectFinisherType().
|
protected |
Hit result - cache.
Most recent target HitZone index
Definition at line 73 of file DayZPlayerImplementMeleeCombat.c.
Referenced by GetHitZoneIdx(), HitZoneSelection(), Init(), InternalResetTarget(), ResetTarget(), SetHitZoneIdx(), SetTarget(), and Update().
|
protected |
Most recent target HitZone name.
Definition at line 75 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelection(), Init(), InternalResetTarget(), ResetTarget(), SetTarget(), and TargetSelection().
|
protected |
Target selecting "component".
Contains logic for Second Pass
Definition at line 37 of file DayZPlayerImplementMeleeCombat.c.
Referenced by Init(), and TargetSelection().
Typenames of objects that can be targeted, but are not a priority (3rd Pass)
Definition at line 50 of file DayZPlayerImplementMeleeCombat.c.
Referenced by CanObjectBeTargeted(), HitZoneSelection(), and Init().
|
protected |
End position of most recent HitZoneSelectionRaycast.
Definition at line 67 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelection(), and HitZoneSelectionRaycast().
|
protected |
DEPRECATED: "HitZoneSelection".
Definition at line 68 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelection().
|
protected |
Start position of most recent HitZoneSelectionRaycast.
Definition at line 66 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelection(), and HitZoneSelectionRaycast().
|
protected |
If most recent attack was a sprint attack.
Definition at line 63 of file DayZPlayerImplementMeleeCombat.c.
Referenced by GetAngle(), Init(), and Reset().
Typenames of all directly/preferred targetable objects (1st Pass + 2nd Pass)
Definition at line 49 of file DayZPlayerImplementMeleeCombat.c.
Referenced by CanObjectBeTargeted(), DayZInfected::ChaseAttackLogic(), DayZInfected::FightAttackLogic(), DayZInfected::Init(), Init(), and TargetSelection().
|
protected |
Targets - types.
Main target found during most recent TargetSelection
Definition at line 40 of file DayZPlayerImplementMeleeCombat.c.
Referenced by ScriptedWidgetEventHandler::GetOnScreenPosition(), GetTargetEntity(), HitZoneSelection(), Init(), InternalResetTarget(), ResetTarget(), ScriptedWidgetEventHandler::SetTarget(), SetTarget(), SetTargetObject(), TargetSelection(), ScriptedWidgetEventHandler::Update(), and Update().
|
protected |
DEPRECATED: Was added but never used..?
Definition at line 41 of file DayZPlayerImplementMeleeCombat.c.
|
protected |
If most recent attack was.
Definition at line 64 of file DayZPlayerImplementMeleeCombat.c.
Referenced by Init(), Reset(), TargetSelection(), and TrySelectFinisherType().
|
protected |
Weapons - cache.
Weapon used during most recent Update
Definition at line 57 of file DayZPlayerImplementMeleeCombat.c.
Referenced by CheckMeleeItem(), ScriptedWidgetEventHandler::GetCrosshairPosition(), HitZoneSelection(), ScriptedWidgetEventHandler::ProjectedCrosshair(), and Reset().
|
protected |
WeaponMode used during most recent Update.
Definition at line 58 of file DayZPlayerImplementMeleeCombat.c.
Referenced by GetWeaponMode(), and Reset().
|
protected |
WeaponRange used during most recent Update.
Definition at line 59 of file DayZPlayerImplementMeleeCombat.c.
Referenced by GetRange(), and Reset().
General range extension.
Definition at line 31 of file DayZPlayerImplementMeleeCombat.c.
Referenced by GetRange().
General range extension while in sprint.
Definition at line 32 of file DayZPlayerImplementMeleeCombat.c.
enum EMeleeHitType TARGETING_ANGLE_NORMAL = 30.0 |
Second Pass: Half angle of cone during sprint.
Definition at line 23 of file DayZPlayerImplementMeleeCombat.c.
Referenced by GetAngle().
Second Pass: How high the cone goes in meters from player position.
Definition at line 25 of file DayZPlayerImplementMeleeCombat.c.
Referenced by TargetSelection().
Second Pass: How deep the cone goes in meters from player position.
Definition at line 24 of file DayZPlayerImplementMeleeCombat.c.
Referenced by TargetSelection().
DEPRECATED: "HitZoneSelection".
Definition at line 28 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelection().
DEPRECATED: "HitZoneSelection".
Definition at line 29 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelection().
DEPRECATED: "HitZoneSelection".
Definition at line 27 of file DayZPlayerImplementMeleeCombat.c.
Referenced by HitZoneSelection().
Second Pass: Max distance from ray projected from player looking direction.
Definition at line 26 of file DayZPlayerImplementMeleeCombat.c.
Referenced by TargetSelection().