3 protected float m_MaximalActionDistanceSq;
7 m_MaximalActionDistanceSq = maximal_target_distance * maximal_target_distance;
12 Object targetObject = target.GetObject();
13 if ( !targetObject || !player )
17 MiscGameplayFunctions.GetHeadBonePos(player, playerHeadPos);
19 float distanceRoot =
vector.DistanceSq(targetObject.GetPosition(), player.GetPosition());
20 float distanceHead =
vector.DistanceSq(targetObject.GetPosition(), playerHeadPos);
22 return ( distanceRoot <= m_MaximalActionDistanceSq || distanceHead <= m_MaximalActionDistanceSq );
28 protected float m_MaximalActionDistanceSq;
32 m_MaximalActionDistanceSq = maximal_target_distance * maximal_target_distance;
37 Object targetParent = target.GetParent();
38 if ( !targetParent || !player )
42 MiscGameplayFunctions.GetHeadBonePos(player, playerHeadPos);
44 float distanceRoot =
vector.DistanceSq(targetParent.GetPosition(), player.GetPosition());
45 float distanceHead =
vector.DistanceSq(targetParent.GetPosition(), playerHeadPos);
47 return ( distanceRoot <= m_MaximalActionDistanceSq || distanceHead <= m_MaximalActionDistanceSq );