DIFF

class ActionTargetsSource

Constructors 1

void ActionTargets(PlayerBase player)
References m_Debug, m_Player, m_Targets
Show 1 more, m_VicinityObjects

Constants 13

private const float c_RayDistance = 5.0

searching properties

Referenced by Update()
private const float c_MaxTargetDistance = 3.0
private const float c_MaxActionDistance = UAMaxDistances.DEFAULT
private const float c_ConeAngle = 30.0
Referenced by DrawDebugCone(), and Update()
private const float c_ConeHeightMin = -0.5
Referenced by Update()
private const float c_ConeHeightMax = 2.0
Referenced by Update()
private const float c_DistanceDelta = 0.3
private const float c_UtilityMaxValue = 10000

utility constants

Referenced by ComputeUtility()
private const float c_UtilityMaxDistFromRaySqr = 0.8 * 0.8
Referenced by ComputeUtility(), and DrawDebugRay()
private const string CE_CENTER = "ce_center"

p3d

private const float HEIGHT_OFFSET = 0.2
private const int OBSTRUCTED_COUNT_THRESHOLD = 3

misc

private const int GROUPING_COUNT_THRESHOLD = 10

Members 13

private ref map<int, ref array<RaycastRVResult>> m_SortedResults = new map<int, ref array<RaycastRVResult>>()
ref array<Shape> shapes = new array<Shape>()DIAG_DEVELOPER

obstruction check

ref array<Shape> dbgConeShapes = new array<Shape>()DIAG_DEVELOPER
Referenced by DrawDebugCone()
ref array<Shape> rayShapes = new array<Shape>()DIAG_DEVELOPER
Referenced by DrawDebugRay()
ref array<Shape> obstruction = new array<Shape>()DIAG_DEVELOPER
ref array<Shape> dbgPosShapes = new array<Shape>()DIAG_DEVELOPER
Referenced by DrawSelectionPos()
private PlayerBase m_Player

player owner

Referenced by ActionTargets(), ComputeUtility(), DrawDebugCone()
Show 1 more, Update()
private ref array<ref ActionTarget> m_Targets

selected & sorted targets by utility function

static private ref VicinityObjects m_VicinityObjects

objects in vicinity

private bool m_Debug
Referenced by ActionTargets()
private vector m_RayEnd
Referenced by DrawDebugRay(), and Update()
private vector m_HitPos

first valid hitpos! Used only as rough reference value for conecasted results.

Referenced by Clear(), DrawDebugRay(), and Update()

Methods 23

static array<Object> GetVicinityObjects()
void Clear()
References map.Clear(), array.Clear(), m_HitPos
Show 3 more, m_SortedResults, m_Targets, and vector.Zero
protected bool IsRaycastResultException(RaycastRVResult res)

Initial raycast filtering exceptions (can't ask the entity type, sadly)

Referenced by Update()
protected array<int> SortResultsDistance(array<ref RaycastRVResult> results)
Referenced by Update()
private bool IsObstructed(Object object)
int GetTargetsCount()

returns count of founded targets

References array.Count(), and m_Targets
ActionTarget GetTarget(int index)

returns action target at index

References array.Get(), and m_Targets
private void StoreTarget(ActionTarget pActionTarget)

inserts action into sorted array based on utility

Referenced by Update()
private int FindIndexForStoring(float value)

binary search algorithm

References array.Count(), array.Get(), ActionTarget.GetUtility()
Show 1 more, m_Targets
Referenced by StoreTarget()
private float DistSqrPoint2Line(vector pPoint, vector pL1, vector pL2)

distance between point and line

Referenced by ComputeUtility()
private void FilterDuplicateVicinityObjects(inout array<Object> vicinityObjectsOutput, array<RaycastRVResult> sortedRaycastResults)
Referenced by Update()
void DrawDebugActionTargets(bool enabled)DIAG_DEVELOPER
Referenced by Update()
private void CleanupDebugShapes(array<Shape> shapesArr)DIAG_DEVELOPER
vector CalculateRayStart()

DEPRECATED