DIFF

class ActionTargets

Constructors 1

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

Constants 14

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.65 * 0.65
Referenced by ComputeUtility(), and DrawDebugRay()
private const float c_UtilityValueCoef = 0.35
Referenced by ComputeUtility()
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 14

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()
private SurfaceInfo m_SurfaceInfo
Referenced by ComputeUtility(), 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
void Update()
References new ActionTarget(), Object.CanBeActionTarget(), Clear()
Show 68 more, VicinityObjects.ClearVicinityObjects(), ComputeUtility(), map.Count(), VicinityObjects.Count(), DrawDebugActionTargets(), DrawDebugCone(), DrawDebugRay(), DrawSelectionPos(), FilterDuplicateVicinityObjects(), FilterObstructedObjectsEx(), Find(), map.Get(), DiagMenu.GetBool(), DayZPlayer.GetCurrentCamera(), CGame.GetCurrentCameraDirection(), CGame.GetCurrentCameraPosition(), DayZPlayerCamera.GetCurrentPitch(), DayZPlayerUtils.GetEntitiesInCone(), SurfaceInfo.GetEntryName(), MiscGameplayFunctions.GetHeadingVector(), IEntity.GetID(), VicinityObjects.GetObject(), VicinityObjects.GetParent(), Object.GetPosition(), CGame.GetSurface(), SurfaceInfo.GetSurfaceType(), array.Insert(), Insert(), array.Insert(), Object.IsMan(), IsRaycastResultException(), DayZPhysics.RayCastBullet(), new RaycastRVParams(), DayZPhysics.RaycastRVProxy(), array.RemoveItem(), ShowDebugActionTargets(), SortResultsDistance(), StoreTarget(), new SurfaceDetectionParameters(), new SurfaceDetectionResult(), VicinityObjects.TransformToVicinityObjects(), c_ConeAngle, c_ConeHeightMax, c_ConeHeightMin, c_MaxTargetDistance, c_RayDistance, RaycastRVResult.component, RaycastRVParams.flags, RaycastRVResult.hierLevel, SurfaceDetectionParameters.includeWater, m_HitPos, m_Player, m_RayEnd, m_RayStart, m_SortedResults, m_SurfaceInfo, m_Targets, m_VicinityObjects, RaycastRVResult.obj, RaycastRVResult.parent, RaycastRVResult.pos, SurfaceDetectionParameters.position, SurfaceDetectionParameters.rsd, RaycastRVResult.surface, SurfaceDetectionResult.surface, SurfaceDetectionParameters.syncMode, SurfaceDetectionParameters.type, 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