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

Protected Member Functions

void CCTCursorNoObject (float maximal_target_distance)
 
override bool Can (PlayerBase player, ActionTarget target)
 

Protected Attributes

float m_MaximalActionDistanceSq
 

Detailed Description

Definition at line 1 of file CCTCursorNoObject.c.

Constructor & Destructor Documentation

◆ CCTCursorNoObject()

void CCTCursorNoObject::CCTCursorNoObject ( float maximal_target_distance)
inlineprotected

Member Function Documentation

◆ Can()

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

Definition at line 10 of file CCTCursorNoObject.c.

11 {
12 if (!target)
13 return false;
14
15 if (GetGame().IsServer() && GetGame().IsMultiplayer())
16 return true;
17
20
21 float distanceRoot = vector.DistanceSq(target.GetCursorHitPos(), player.GetPosition());
22 float distanceHead = vector.DistanceSq(target.GetCursorHitPos(), playerHeadPos);
23
25 }
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
proto native CGame GetGame()

References vector::DistanceSq(), GetGame(), and m_MaximalActionDistanceSq.

Member Data Documentation

◆ m_MaximalActionDistanceSq

float CCTCursorNoObject::m_MaximalActionDistanceSq
protected

Definition at line 3 of file CCTCursorNoObject.c.

Referenced by Can(), and CCTCursorNoObject().


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