DayZ 1.24
Loading...
Searching...
No Matches
CCTCursorNoRuinCheck Class Reference
Inheritance diagram for CCTCursorNoRuinCheck:
[legend]
Collaboration diagram for CCTCursorNoRuinCheck:
[legend]

Protected Member Functions

void CCTCursorNoRuinCheck (float maximal_target_distance=UAMaxDistances.DEFAULT)
 
override bool Can (PlayerBase player, ActionTarget target)
 

Protected Attributes

float m_MaximalActionDistanceSq
 
const float HEIGHT_ERECT = 1.6
 
const float HEIGHT_CROUCH = 1.05
 
const float HEIGHT_PRONE = 0.66
 

Detailed Description

Definition at line 1 of file CCTCursorNoRuinCheck.c.

Constructor & Destructor Documentation

◆ CCTCursorNoRuinCheck()

void CCTCursorNoRuinCheck::CCTCursorNoRuinCheck ( float maximal_target_distance = UAMaxDistances.DEFAULT)
inlineprotected

Member Function Documentation

◆ Can()

override bool CCTCursorNoRuinCheck::Can ( PlayerBase player,
ActionTarget target )
inlineprotected

Definition at line 15 of file CCTCursorNoRuinCheck.c.

16 {
17 if (!target)
18 return false;
19
20 Object targetObject = target.GetObject();
21 if (!targetObject)
22 targetObject = target.GetParent();
23
24 if (!player || !targetObject)
25 return false;
26
29
30 float distanceRoot = vector.DistanceSq(target.GetCursorHitPos(), player.GetPosition());
31 float distanceHead = vector.DistanceSq(target.GetCursorHitPos(), playerHeadPos);
32
34 }
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.

References vector::DistanceSq(), and m_MaximalActionDistanceSq.

Member Data Documentation

◆ HEIGHT_CROUCH

const float CCTCursorNoRuinCheck::HEIGHT_CROUCH = 1.05
protected

Definition at line 7 of file CCTCursorNoRuinCheck.c.

◆ HEIGHT_ERECT

const float CCTCursorNoRuinCheck::HEIGHT_ERECT = 1.6
protected

Definition at line 6 of file CCTCursorNoRuinCheck.c.

◆ HEIGHT_PRONE

const float CCTCursorNoRuinCheck::HEIGHT_PRONE = 0.66
protected

Definition at line 8 of file CCTCursorNoRuinCheck.c.

◆ m_MaximalActionDistanceSq

float CCTCursorNoRuinCheck::m_MaximalActionDistanceSq
protected

Definition at line 3 of file CCTCursorNoRuinCheck.c.

Referenced by Can(), and CCTCursorNoRuinCheck().


The documentation for this class was generated from the following file: