DayZ 1.24
Loading...
Searching...
No Matches
CCTObject.c
Go to the documentation of this file.
2{
3 protected float m_MaximalActionDistanceSq;
4
9
10 override bool Can(PlayerBase player, ActionTarget target)
11 {
12 Object targetObject = target.GetObject();
13 if (!targetObject || !player)
14 return false;
15
18
19 float distanceRoot = vector.DistanceSq(targetObject.GetPosition(), player.GetPosition());
21
23 }
24};
25
27{
29
34
35 override bool Can(PlayerBase player, ActionTarget target)
36 {
37 Object targetParent = target.GetParent();
38 if (!targetParent || !player)
39 return false;
40
43
44 float distanceRoot = vector.DistanceSq(targetParent.GetPosition(), player.GetPosition());
46
48 }
49};
override bool Can(PlayerBase player, ActionTarget target)
Definition CCTObject.c:10
void CCTObject(float maximal_target_distance=UAMaxDistances.DEFAULT)
Definition CCTObject.c:5
float m_MaximalActionDistanceSq
Definition CCTObject.c:3
override bool Can(PlayerBase player, ActionTarget target)
Definition CCTObject.c:35
void CCTParent(float maximal_target_distance=UAMaxDistances.DEFAULT)
Definition CCTObject.c:30
float m_MaximalActionDistanceSq
Definition CCTObject.c:28
const float DEFAULT
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.