DayZ 1.24
Loading...
Searching...
No Matches
CCTCursorParent.c
Go to the documentation of this file.
2{
3 protected float m_MaximalActionDistanceSq;
4
5 //approximate head heights
6 const float HEIGHT_ERECT = 1.6;
7 const float HEIGHT_CROUCH = 1.05;
8 const float HEIGHT_PRONE = 0.66;
9
14
15 override bool Can(PlayerBase player, ActionTarget target)
16 {
17 if (!target)
18 return false;
19
20 Object parentObject = target.GetParent();
21 if (!player || !parentObject || parentObject.IsDamageDestroyed())
22 return false;
23
26
27 float distanceRoot = vector.DistanceSq(target.GetCursorHitPos(), player.GetPosition());
28 float distanceHead = vector.DistanceSq(target.GetCursorHitPos(), playerHeadPos);
29
31 }
32};
const float HEIGHT_ERECT
const float HEIGHT_CROUCH
void CCTCursorParent(float maximal_target_distance=UAMaxDistances.DEFAULT)
override bool Can(PlayerBase player, ActionTarget target)
float m_MaximalActionDistanceSq
const float HEIGHT_PRONE
const float DEFAULT
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.