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

Protected Member Functions

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

Protected Attributes

float m_MaximalActionDistanceSq
 

Detailed Description

Definition at line 1 of file CCTNonRuined.c.

Constructor & Destructor Documentation

◆ CCTNonRuined()

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

Member Function Documentation

◆ Can()

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

Definition at line 10 of file CCTNonRuined.c.

11 {
12 if (!target)
13 return false;
14
15 Object targetObject = target.GetObject();
16 if (!player || !targetObject || targetObject.IsMan() || targetObject.IsDamageDestroyed())
17 return false;
18
19 return (vector.DistanceSq(targetObject.GetPosition(), player.GetPosition()) <= m_MaximalActionDistanceSq);
20 }
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

◆ m_MaximalActionDistanceSq

float CCTNonRuined::m_MaximalActionDistanceSq
protected

Definition at line 3 of file CCTNonRuined.c.

Referenced by Can(), and CCTNonRuined().


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