class ActionTargets
Constructors 1
void ActionTargets(PlayerBase player)Referenced by ActionManagerClient.ActionManagerClient()
Constants 14
private const float c_MaxTargetDistance = 3.0private const float c_MaxActionDistance = UAMaxDistances.DEFAULTprivate const float c_ConeAngle = 30.0private const float c_DistanceDelta = 0.3Referenced by FilterObstructedObjectsEx()
private const float c_UtilityMaxDistFromRaySqr = 0.65 * 0.65private const float c_UtilityValueCoef = 0.35Referenced by ComputeUtility()
private const string CE_CENTER = "ce_center"p3d
private const float HEIGHT_OFFSET = 0.2private const int GROUPING_COUNT_THRESHOLD = 10Referenced by FilterObstructedObjectsEx()
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_DEVELOPERobstruction check
Referenced by DrawDebugActionTargets()
ref array<Shape> dbgConeShapes = new array<Shape>()DIAG_DEVELOPERReferenced by DrawDebugCone()
ref array<Shape> rayShapes = new array<Shape>()DIAG_DEVELOPERReferenced by DrawDebugRay()
ref array<Shape> obstruction = new array<Shape>()DIAG_DEVELOPERReferenced by FilterObstructedObjectsEx()
ref array<Shape> dbgPosShapes = new array<Shape>()DIAG_DEVELOPERReferenced by DrawSelectionPos()
private PlayerBase m_Playerplayer owner
private ref array<ref ActionTarget> m_Targetsselected & sorted targets by utility function
Referenced by ActionTargets(), Clear(), DrawDebugActionTargets()
Show 6 more
, FindIndexForStoring(), GetTarget(), GetTargetsCount(), ShowDebugActionTargets(), StoreTarget(), and Update()static private ref VicinityObjects m_VicinityObjectsobjects in vicinity
Referenced by ActionTargets(), FilterObstructedObjects(), FilterObstructedObjectsEx()
Show 2 more
, GetVicinityObjects(), and Update()private bool m_DebugReferenced by ActionTargets()
private vector m_RayStartReferenced by DrawDebugRay(), FilterObstructedObjects(), FilterObstructedObjectsEx()
Show 3 more
, IsObstructed(), SortResultsDistance(), and Update()private vector m_RayEndprivate vector m_HitPosfirst valid hitpos! Used only as rough reference value for conecasted results.
private SurfaceInfo m_SurfaceInfoMethods 23
void Clear()References map.Clear(), array.Clear(), m_HitPos
Show 3 more
, m_SortedResults, m_Targets, and vector.Zerovoid 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.ZeroReferenced by ActionManagerClient.Update()
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)References vector.DistanceSq(), array.Find(), map.Get()
Show 7 more
, array.Insert(), array.Insert(), map.Set(), array.Sort(), m_RayStart, m_SortedResults, and RaycastRVResult.posReferenced by Update()
private bool IsObstructedEx(Object object, IsObjectObstructedCache cache)References MiscGameplayFunctions.IsObjectObstructedEx()
int GetTargetsCount()returns count of founded targets
Referenced by ActionManagerClient.FindActionTarget(), DrawDebugActionTargets(), DrawSelectionPos()
Show 1 more
, ShowDebugActionTargets()ActionTarget GetTarget(int index)returns action target at index
private void StoreTarget(ActionTarget pActionTarget)inserts action into sorted array based on utility
References FindIndexForStoring(), ActionTarget.GetUtility(), array.InsertAt()
Show 1 more
, m_TargetsReferenced by Update()
binary search algorithm
Referenced by StoreTarget()
private float ComputeUtility(Object pTarget, vector pRayStart, vector pRayEnd, Object cursorTarget, vector hitPos)computes utility of target
References Object.CanUseConstruction(), Class.Cast(), vector.DistanceSq()
Show 18 more
, DistSqrPoint2Line(), SurfaceInfo.GetLiquidType(), Object.GetPosition(), Object.GetPosition(), Object.GetType(), Object.IsBuilding(), Object.IsBush(), DayZPlayerImplement.IsInVehicle(), Object.IsTransport(), Object.IsTree(), Object.IsWell(), c_MaxTargetDistance, c_UtilityMaxDistFromRaySqr, c_UtilityMaxValue, c_UtilityValueCoef, string.Empty, m_Player, and m_SurfaceInfoReferenced by Update()
distance between point and line
Referenced by ComputeUtility()
private void FilterDuplicateVicinityObjects(inout array<Object> vicinityObjectsOutput, array<RaycastRVResult> sortedRaycastResults)References array.Clear(), array.Copy(), array.Find()
Show 2 more
, array.Insert(), and RaycastRVResult.objReferenced by Update()
References Class.Cast(), CleanupDebugShapes(), VicinityObjects.ClearVicinityObjects()
Show 15 more
, VicinityObjects.Count(), array.Count(), FilterObstructedObjects(), MiscGameplayFunctions.FilterObstructedObjectsByGrouping(), MiscGameplayFunctions.FilterObstructingObjects(), DiagMenu.GetBool(), CGame.GetPlayer(), VicinityObjects.GetRawVicinityObjects(), VicinityObjects.TransformToVicinityObjects(), c_DistanceDelta, c_MaxTargetDistance, GROUPING_COUNT_THRESHOLD, m_RayStart, m_VicinityObjects, and obstructionReferenced by Update()
private void FilterObstructedObjects(Object cursor_target)References IsObjectObstructedCache.ClearCache(), VicinityObjects.Count(), VicinityObjects.GetObject()
Referenced by FilterObstructedObjectsEx()
void ShowDebugActionTargets(bool enabled)DIAG_DEVELOPERReferences DbgUI.Begin(), DbgUI.BeginCleanupScope(), array.Count()
Show 13 more
, DbgUI.End(), DbgUI.EndCleanupScope(), array.Get(), Object.GetActionComponentName(), Object.GetActionComponentNameList(), GetComponentIndex(), Object.GetDisplayName(), GetObject(), GetTargetsCount(), ActionTarget.GetUtility(), Object.GetWorldPosition(), DbgUI.Text(), and m_TargetsReferenced by Update()
void DrawDebugActionTargets(bool enabled)DIAG_DEVELOPERReferences CleanupDebugShapes(), Debug.DrawLine(), Debug.DrawSphere()
Show 7 more
, array.Get(), GetObject(), Object.GetPosition(), GetTargetsCount(), array.Insert(), m_Targets, and shapesReferenced by Update()
private void DrawDebugCone(bool enabled)DIAG_DEVELOPERReferenced by Update()
private void DrawSelectionPos(bool enabled)DIAG_DEVELOPERReferenced by Update()
private void DrawDebugRay(bool enabled)DIAG_DEVELOPERReferences CleanupDebugShapes(), Debug.DrawLine(), Debug.DrawSphere()
Show 7 more
, array.Insert(), Math.Sqrt(), c_UtilityMaxDistFromRaySqr, m_HitPos, m_RayEnd, m_RayStart, and rayShapesReferenced by Update()
private void CleanupDebugShapes(array<Shape> shapesArr)DIAG_DEVELOPERReferenced by DrawDebugActionTargets(), DrawDebugCone(), DrawDebugRay()
Show 2 more
, DrawSelectionPos(), and FilterObstructedObjectsEx()vector CalculateRayStart()DEPRECATED