Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiontargets.c
Go to the documentation of this file.
1 class VicinityObjects
3 {
4  private ref map<Object, Object> m_VicinityObjects;
5 
6  void VicinityObjects()
7  {
9  }
10 
12  void StoreVicinityObject(Object object, Object parent = null)
13  {
15  ItemBase ib = ItemBase.Cast(object);
16  if (ib && (ib.IsBeingPlaced() || ib.IsHologram()))
17  return;
18 
20  /*if(object && object.IsPlainObject())
21  {
22  Print("ERROR: VicinityObjects | StoreVicinityObject | IsPlainObject check fail");
23  return;
24  }*/
25 
26  if ( !m_VicinityObjects.Contains(object) )
27  {
29  m_VicinityObjects.Set(object, parent);
30  }
31  }
32 
34  void TransformToVicinityObjects(array<Object> objects)
35  {
36  for (int i = 0; i < objects.Count(); i++)
37  {
38  if (objects[i].GetType() != "" && objects[i].CanBeActionTarget())
39  {
40  StoreVicinityObject(objects[i]);
41  //Print("storing, 2nd pass: " + objects[i]);
42  }
43  }
44  }
45 
46  void ClearVicinityObjects()
47  {
48  m_VicinityObjects.Clear();
49  }
50 
52  array< Object > GetVicinityObjects()
53  {
54  ref array<Object> vicinityObjects = new array<Object>;
55  for (int i = 0; i < m_VicinityObjects.Count(); i++)
56  {
58  ItemBase ib = ItemBase.Cast(GetObject(i));
59  if (ib && !ib.IsTakeable())
60  continue;
61 
62  vicinityObjects.Insert(GetObject(i));
63  }
64 
65  return vicinityObjects;
66  }
67 
69  array< Object > GetRawVicinityObjects()
70  {
71  ref array<Object> vicinityObjects = new array<Object>;
72  for (int i = 0; i < m_VicinityObjects.Count(); i++)
73  {
74  vicinityObjects.Insert(GetObject(i));
75  }
76 
77  return vicinityObjects;
78  }
79 
81  Object GetObject(int i)
82  {
83  return m_VicinityObjects.GetKey(i);
84  }
85 
87  Object GetParent(int i)
88  {
89  return m_VicinityObjects.GetElement(i);
90  }
91 
92  int Count()
93  {
94  return m_VicinityObjects.Count();
95  }
96 
97  void Remove(Object object)
98  {
99  m_VicinityObjects.Remove(object);
100  }
101 
102  void Remove(array<Object> objects)
103  {
104  for (int i = 0; i < objects.Count(); i++)
105  {
106  m_VicinityObjects.Remove(objects[i]);
107  }
108  }
109 }
110 
111 class ActionTarget
112 {
113  void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility)
114  {
115  m_Object = object;
116  m_Parent = parent;
117  m_ComponentIndex = componentIndex;
118  m_CursorHitPos = cursorHitPos;
119  m_Utility = utility;
120  }
121 
123  { return m_Object; }
124 
126  { return m_Parent; }
127 
128  bool IsProxy()
129  {
130  if (m_Parent)
131  return true;
132  return false;
133  }
134 
136  { return m_ComponentIndex; }
137 
138  float GetUtility()
139  { return m_Utility; }
140 
142  { return m_CursorHitPos; }
143 
144  void SetCursorHitPos(vector cursor_position)
145  {
146  m_CursorHitPos = cursor_position;
147  }
148 
150  {
151  Print(DumpToString());
152  }
153 
154  string DumpToString()
155  {
156  string res = "ActionTarget dump = {";
157  res = res + "m_Object: " + Object.GetDebugName(m_Object);
158  res = res + "; m_Parent: " + Object.GetDebugName(m_Parent);
159  res = res + "; m_ComponentIndex: " + m_ComponentIndex.ToString();
160  res = res + "; m_CursorHitPos: " + m_CursorHitPos.ToString();
161  res = res + "; m_Utility: " + m_Utility.ToString();
162  res = res + "}";
163  return res;
164  }
165 
166  private Object m_Object; // object itself
167  private Object m_Parent; // null or parent of m_Object
168  private int m_ComponentIndex; // p3d Component ID or -1
170  private float m_Utility;
171 };
172 
174 {
175  void ActionTargets(PlayerBase player)
176  {
177  m_Player = player;
179  m_Targets = new array<ref ActionTarget>;
180 
181  m_Debug = false;
182  }
183 
184  static array<Object> GetVicinityObjects()
185  {
186  return m_VicinityObjects.GetVicinityObjects();
187  }
188 
189  void Clear()
190  {
191  m_Targets.Clear();
192  }
193 
194  void Update()
195  {
196  int i;
197 
199  m_VicinityObjects.ClearVicinityObjects();
200  Clear();
201 
202  Object cursorTarget = null;
203  EntityAI cursorTargetEntity = null;
204  array<Object> vicinityObjects = new array<Object>;
205 
207  int hitComponentIndex;
208  vector playerPos = m_Player.GetPosition();
209  vector headingDirection = MiscGameplayFunctions.GetHeadingVector(m_Player);
210 
211  m_RayStart = GetGame().GetCurrentCameraPosition();
212  m_RayEnd = m_RayStart + GetGame().GetCurrentCameraDirection() * c_RayDistance;
213 
214  RaycastRVParams rayInput = new RaycastRVParams(m_RayStart, m_RayEnd, m_Player);
215  rayInput.flags = CollisionFlags.ALLOBJECTS;
216  //rayInput.sorted = true;
218 
219  if ( DayZPhysics.RaycastRVProxy(rayInput, results) )
220  {
221  if ( results.Count() > 0 )
222  {
223  array<float> distance_helper = new array<float>;
224  array<float> distance_helper_unsorted = new array<float>;
225  float distance;
226 
227  for (i = 0; i < results.Count(); i++)
228  {
229  distance = vector.DistanceSq(results[i].pos, m_RayStart);
230  distance_helper.Insert(distance);
231  //Print("#" + i + " " + results.Get(i).obj);
232  }
233  //Print("--------------");
234  distance_helper_unsorted.Copy(distance_helper);
235  distance_helper.Sort();
236 
237  RaycastRVResult res;
238 
239 
240  for ( i = 0; i < results.Count(); i++)
241  {
242  res = results.Get(distance_helper_unsorted.Find(distance_helper[i])); //closest object
243 
244  cursorTarget = res.obj;
245  Class.CastTo(cursorTargetEntity,cursorTarget);
246  if (cursorTarget && !cursorTarget.CanBeActionTarget())
247  continue;
249  if ( res.hierLevel > 0 )
250  {
252  if ( !res.parent.IsMan() )
253  {
254  m_VicinityObjects.StoreVicinityObject(res.obj, res.parent);
255  //Print("storing, 1st pass (hier > 0): " + res.obj);
256  }
257  else
258  continue;
259  }
260  else
261  {
262  m_VicinityObjects.StoreVicinityObject(res.obj, null);
263  //Print("storing, 1st pass: " + res.obj);
264  }
265 
266  m_HitPos = res.pos;
267  hitComponentIndex = res.component;
268  break;
269  }
270  }
271  //else
272  //Print("NO RESULTS FOUND!");
273  }
274  else
275  {
276  //Print("CAST UNSUCCESFUL");
277  cursorTarget = null;
278  m_HitPos = vector.Zero;
279  hitComponentIndex = -1;
280  }
281 
282  //Print(cursorTarget);
283 
285  DayZPlayerCamera camera = m_Player.GetCurrentCamera();
286  if (camera && camera.GetCurrentPitch() <= -45) // Spatial search is a contributor to very heavy searching, limit it to when we are at least looking down
287  DayZPlayerUtils.GetEntitiesInCone(playerPos, headingDirection, c_ConeAngle, c_MaxTargetDistance, c_ConeHeightMin, c_ConeHeightMax, vicinityObjects);
288 
290  vicinityObjects.RemoveItem(m_Player);
291 
293  //Print("m_VicinityObjects before" + m_VicinityObjects.Count());
294  m_VicinityObjects.TransformToVicinityObjects(vicinityObjects);
295  //Print("m_VicinityObjects after" + m_VicinityObjects.Count());
296 
298  FilterObstructedObjectsEx(cursorTarget, vicinityObjects);
299 
301  for ( i = 0; i < m_VicinityObjects.Count(); i++ )
302  {
303  Object object = m_VicinityObjects.GetObject(i);
304  Object parent = m_VicinityObjects.GetParent(i);
305 
306  float utility = ComputeUtility(object, m_RayStart, m_RayEnd, cursorTarget, m_HitPos);
307  if ( utility > 0 )
308  {
309  int targetComponent = -1;
310  targetComponent = hitComponentIndex;
311 
312  ActionTarget at = new ActionTarget(object, parent, targetComponent, m_HitPos, utility);
313  StoreTarget(at);
314  }
315  /*else
316  Print("utility < 0; object: " + object + " | parent: " + parent);*/
317  }
318 
320  if (m_HitPos == vector.Zero)
321  {
322  vector contact_pos, contact_dir, hitNormal;
323  int contactComponent;
324  float hitFraction;
325  Object hitObject;
326 
327  m_RayEnd = m_RayStart + GetGame().GetCurrentCameraDirection() * c_RayDistance * 3;
328 
329  PhxInteractionLayers collisionLayerMask = PhxInteractionLayers.ROADWAY|PhxInteractionLayers.TERRAIN|PhxInteractionLayers.WATERLAYER;
330  DayZPhysics.RayCastBullet(m_RayStart,m_RayEnd,collisionLayerMask,null,hitObject,contact_pos,hitNormal,hitFraction);
331  m_HitPos = contact_pos;
332  }
333 
334  m_Targets.Insert(new ActionTarget(null, null, -1, m_HitPos, 0));
335 
336 #ifdef DIAG_DEVELOPER
337  if (DiagMenu.GetBool(DiagMenuIDs.MISC_ACTION_TARGETS_DEBUG))
338  {
339  ShowDebugActionTargets(true);
340  DrawDebugActionTargets(true);
341  DrawDebugCone(true);
342  DrawDebugRay(true);
343  DrawSelectionPos(DiagMenu.GetBool(DiagMenuIDs.MISC_ACTION_TARGETS_SELPOS_DEBUG));
344  }
345  else
346  {
347  ShowDebugActionTargets(false);
348  DrawDebugActionTargets(false);
349  DrawDebugCone(false);
350  DrawDebugRay(false);
351  DrawSelectionPos(false);
352  }
353 #endif
354  //Print("--------------");
355  }
356 
357  private bool IsObstructed(Object object)
358  {
359  IsObjectObstructedCache cache = new IsObjectObstructedCache(m_RayStart, 1);
360  return IsObstructedEx(object, cache);
361  }
362 
363  private bool IsObstructedEx(Object object, IsObjectObstructedCache cache)
364  {
365  return MiscGameplayFunctions.IsObjectObstructedEx(object, cache);
366  }
367 
369  int GetTargetsCount()
370  { return m_Targets.Count(); }
371 
373  ActionTarget GetTarget(int index)
374  { return m_Targets.Get(index); }
375 
377  private void StoreTarget(ActionTarget pActionTarget)
378  {
379  int index = FindIndexForStoring(pActionTarget.GetUtility());
380  m_Targets.InsertAt(pActionTarget, index);
381  //Print("StoreTarget; object: " + pActionTarget.GetObject() + " | parent: " + pActionTarget.GetParent() + " | idx: " + index);
382  }
383 
385  private int FindIndexForStoring(float value)
386  {
387  int left = 0;
388  int right = m_Targets.Count() - 1;
389  while ( left <= right )
390  {
391  int middle = (left + right) / 2;
392  float middleValue = m_Targets.Get(middle).GetUtility();
393 
394  if ( middleValue == value )
395  return middle;
396  else if ( middleValue < value )
397  right = middle - 1;
398  else
399  left = middle + 1;
400  }
401 
402  return left;
403  }
404 
406  private float ComputeUtility(Object pTarget, vector pRayStart, vector pRayEnd, Object cursorTarget, vector hitPos)
407  {
409  if (vector.DistanceSq(hitPos, m_Player.GetPosition()) > c_MaxTargetDistance * c_MaxTargetDistance)
410  return -1;
411 
412  if (pTarget)
413  {
414  if ( pTarget == cursorTarget )
415  {
417  if ( pTarget.GetType() == string.Empty )
418  return 0.01;
419 
420  if ( pTarget.IsBuilding() )
421  return 0.25;
422 
423  if ( pTarget.IsTransport() )
424  return 0.25;
425 
427  if (pTarget.CanUseConstruction())
428  return 0.85;
429 
430  if ( pTarget.IsWell() )
431  return 0.9;
432 
433  vector playerPosXZ = m_Player.GetPosition();
434  vector hitPosXZ = hitPos;
435  playerPosXZ[1] = 0;
436  hitPosXZ[1] = 0;
437  if ( vector.DistanceSq(playerPosXZ, hitPosXZ) <= c_MaxTargetDistance * c_MaxTargetDistance )
438  return c_UtilityMaxValue;
439  }
440 
441  float distSqr = DistSqrPoint2Line(pTarget.GetPosition(), pRayStart, pRayEnd);
442  return (c_UtilityMaxDistFromRaySqr - distSqr) / c_UtilityMaxDistFromRaySqr;
443  }
444 
445  return -1;
446  }
447 
449  private float DistSqrPoint2Line(vector pPoint, vector pL1, vector pL2)
450  {
451  vector v = pL2 - pL1;
452  vector w = pPoint - pL1;
453 
454  float c1 = vector.Dot(w,v);
455  float c2 = vector.Dot(v,v);
456 
457  if ( c1 <= 0 || c2 == 0 )
458  return vector.DistanceSq(pPoint, pL1);
459 
460  float b = c1 / c2;
461  vector nearestPoint = pL1 + (v * b);
462  return vector.DistanceSq(pPoint, nearestPoint);
463  }
464 
465  private void FilterObstructedObjectsEx(Object cursor_target, array<Object> vicinityObjects)
466  {
467  #ifdef DIAG_DEVELOPER
468  if (DiagMenu.GetBool(DiagMenuIDs.MISC_ACTION_TARGETS_DEBUG))
469  CleanupDebugShapes(obstruction);
470  #endif
471 
472  array<Object> obstructingObjects = new array<Object>;
473  MiscGameplayFunctions.FilterObstructingObjects(vicinityObjects, obstructingObjects);
474 
475  if ( obstructingObjects.Count() > 0 )
476  {
477  PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
478 
479  int numObstructed = 0;
480  int mCount = m_VicinityObjects.Count();
481 
482  if (mCount > GROUPING_COUNT_THRESHOLD)
483  {
484  array<Object> filteredObjects = new array<Object>;
485  MiscGameplayFunctions.FilterObstructedObjectsByGrouping(m_RayStart, c_MaxTargetDistance, c_DistanceDelta, m_VicinityObjects.GetRawVicinityObjects(), vicinityObjects, filteredObjects);
486  m_VicinityObjects.ClearVicinityObjects();
487  m_VicinityObjects.TransformToVicinityObjects(filteredObjects);
488  }
489  else
490  {
491  FilterObstructedObjects(cursor_target);
492  }
493  }
494  }
495 
496  private void FilterObstructedObjects(Object cursor_target)
497  {
498  int numObstructed = 0;
499  int mCount = m_VicinityObjects.Count();
500  IsObjectObstructedCache cache = new IsObjectObstructedCache(m_RayStart, mCount);
501  mCount--;
502 
504  for ( int i = mCount; i >= 0; --i )
505  {
506  Object object = m_VicinityObjects.GetObject(i);
507  Object parent = m_VicinityObjects.GetParent(i);
508 
510  if (object && !parent)
511  {
514  if (numObstructed > OBSTRUCTED_COUNT_THRESHOLD && object != cursor_target)
515  {
516  m_VicinityObjects.Remove(object);
517  continue;
518  }
519 
521  if (object != cursor_target && IsObstructedEx(object, cache))
522  {
523  m_VicinityObjects.Remove(object);
524  numObstructed++;
525  }
526 
527  cache.ClearCache();
528  }
529  }
530  }
531 
532 #ifdef DIAG_DEVELOPER
533  ref array<Shape> shapes = new array<Shape>();
534  ref array<Shape> dbgConeShapes = new array<Shape>();
535  ref array<Shape> rayShapes = new array<Shape>();
536  ref array<Shape> obstruction = new array<Shape>();
537  ref array<Shape> dbgPosShapes = new array<Shape>();
538 
539  void ShowDebugActionTargets(bool enabled)
540  {
541  int windowPosX = 0;
542  int windowPosY = 50;
543 
544  Object obj;
545 
546  DbgUI.BeginCleanupScope();
547  DbgUI.Begin("Action Targets", windowPosX, windowPosY);
548  if ( enabled )
549  {
550  for ( int i = 0; i < GetTargetsCount(); i++ )
551  {
552  obj = m_Targets.Get(i).GetObject();
553  if ( obj )
554  {
555  float util = m_Targets.Get(i).GetUtility();
556  int compIdx = m_Targets.Get(i).GetComponentIndex();
557  string compName;
558  array<string> compNames = new array<string>;
559  compName = obj.GetActionComponentName(compIdx);
560  obj.GetActionComponentNameList(compIdx, compNames);
561 
562  if ( compNames.Count() > 0 )
563  {
564  for ( int c = 0; c < compNames.Count(); c++ )
565  {
566  DbgUI.Text(obj.GetDisplayName() + " :: " + obj + " | util: " + util + " | compIdx: " + compIdx + " | compName: " + compNames[c] + "| wPos: " + obj.GetWorldPosition() );
567  }
568  }
569  else
570  {
571  DbgUI.Text(obj.GetDisplayName() + " :: " + obj + " | util: " + util + " | compIdx: " + compIdx + " | compName: " + compName + "| wPos: " + obj.GetWorldPosition() );
572  }
573  }
574  else
575  continue;
576  }
577  }
578  DbgUI.End();
579  DbgUI.EndCleanupScope();
580  }
581 
582  void DrawDebugActionTargets(bool enabled)
583  {
584  int s_id;
585  vector w_pos;
586  vector w_pos_sphr;
587  vector w_pos_lend;
588  Object obj;
589 
590  if ( enabled )
591  {
592  CleanupDebugShapes(shapes);
593 
594  for ( int i = 0; i < GetTargetsCount(); i++ )
595  {
596  obj = m_Targets.Get(i).GetObject();
597  if ( obj )
598  {
599  w_pos = obj.GetPosition();
600  // sphere pos tweaks
601  w_pos_sphr = w_pos;
602  w_pos_sphr[1] = w_pos_sphr[1] + 0.5;
603  // line pos tweaks
604  w_pos_lend = w_pos;
605  w_pos_lend[1] = w_pos_lend[1] + 0.5;
606 
607  if ( i == 0 )
608  {
609  shapes.Insert( Debug.DrawSphere(w_pos_sphr, 0.03, COLOR_RED) );
610  shapes.Insert( Debug.DrawLine(w_pos, w_pos_lend, COLOR_RED) );
611  }
612  else
613  {
614  shapes.Insert( Debug.DrawSphere(w_pos_sphr, 0.03, COLOR_YELLOW) );
615  shapes.Insert( Debug.DrawLine(w_pos, w_pos_lend, COLOR_YELLOW) );
616  }
617  }
618  }
619  }
620  else
621  CleanupDebugShapes(shapes);
622  }
623 
624  private void DrawDebugCone(bool enabled)
625  {
626  // "cone" settings
627  vector start, end, endL, endR;
628  float playerAngle;
629  float xL,xR,zL,zR;
630 
631  if (enabled)
632  {
633  CleanupDebugShapes(dbgConeShapes);
634 
635  start = m_Player.GetPosition();
636  playerAngle = MiscGameplayFunctions.GetHeadingAngle(m_Player);
637 
638  // offset position of the shape in height
639  start[1] = start[1] + 0.2;
640 
641  endL = start;
642  endR = start;
643  xL = c_MaxTargetDistance * Math.Cos(playerAngle + Math.PI_HALF + c_ConeAngle * Math.DEG2RAD); // x
644  zL = c_MaxTargetDistance * Math.Sin(playerAngle + Math.PI_HALF + c_ConeAngle * Math.DEG2RAD); // z
645  xR = c_MaxTargetDistance * Math.Cos(playerAngle + Math.PI_HALF - c_ConeAngle * Math.DEG2RAD); // x
646  zR = c_MaxTargetDistance * Math.Sin(playerAngle + Math.PI_HALF - c_ConeAngle * Math.DEG2RAD); // z
647  endL[0] = endL[0] + xL;
648  endL[2] = endL[2] + zL;
649  endR[0] = endR[0] + xR;
650  endR[2] = endR[2] + zR;
651 
652  dbgConeShapes.Insert( Debug.DrawLine(start, endL, COLOR_BLUE) );
653  dbgConeShapes.Insert( Debug.DrawLine(start, endR, COLOR_BLUE) ) ;
654  dbgConeShapes.Insert( Debug.DrawLine(endL, endR, COLOR_BLUE) );
655  }
656  else
657  CleanupDebugShapes(dbgConeShapes);
658  }
659 
660  private void DrawSelectionPos(bool enabled)
661  {
662  if (enabled)
663  {
664  CleanupDebugShapes(dbgPosShapes);
665  if (GetTargetsCount() > 0 && GetTarget(0).GetUtility() > -1 )
666  {
667  ActionTarget at = GetTarget(0);
668  if (at.GetObject())
669  {
670  string compName = at.GetObject().GetActionComponentName(at.GetComponentIndex());
671  vector modelPos = at.GetObject().GetSelectionPositionMS(compName);
672  vector worldPos = at.GetObject().ModelToWorld(modelPos);
673  dbgPosShapes.Insert( Debug.DrawSphere(worldPos, 0.25, Colors.PURPLE, ShapeFlags.NOZBUFFER) );
674  }
675  }
676  }
677  else
678  CleanupDebugShapes(dbgPosShapes);
679  }
680 
681  private void DrawDebugRay(bool enabled)
682  {
683  if (enabled)
684  {
685  CleanupDebugShapes(rayShapes);
686  rayShapes.Insert( Debug.DrawSphere(m_HitPos, Math.Sqrt(c_UtilityMaxDistFromRaySqr), COLOR_BLUE_A, ShapeFlags.TRANSP) );
687  rayShapes.Insert( Debug.DrawLine(m_RayStart, m_RayEnd, COLOR_BLUE) );
688  }
689  else
690  CleanupDebugShapes(rayShapes);
691  }
692 
693  private void CleanupDebugShapes(array<Shape> shapesArr)
694  {
695  for ( int it = 0; it < shapesArr.Count(); ++it )
696  {
697  Debug.RemoveShape( shapesArr[it] );
698  }
699 
700  shapesArr.Clear();
701  }
702 #endif
703 
704  //--------------------------------------------------------
705  // Members
706  //--------------------------------------------------------
708  private PlayerBase m_Player;
709 
711  private ref array<ref ActionTarget> m_Targets;
712 
714  static private ref VicinityObjects m_VicinityObjects
715 
716  private bool m_Debug
717 
718  private vector m_RayStart;
719  private vector m_RayEnd;
720  private vector m_HitPos;
721 
722  //--------------------------------------------------------
723  // Constants
724  //--------------------------------------------------------
726  private const float c_RayDistance = 5.0;
727  private const float c_MaxTargetDistance = 3.0;
728  private const float c_MaxActionDistance = UAMaxDistances.DEFAULT;
729  private const float c_ConeAngle = 30.0;
730  private const float c_ConeHeightMin = -0.5;
731  private const float c_ConeHeightMax = 2.0;
732  private const float c_DistanceDelta = 0.3;
733 
735  private const float c_UtilityMaxValue = 10000;
736  private const float c_UtilityMaxDistFromRaySqr = 0.8 * 0.8;
737 
739  private const string CE_CENTER = "ce_center";
740  private const float HEIGHT_OFFSET = 0.2;
741 
743  private const int OBSTRUCTED_COUNT_THRESHOLD = 3;
744  private const int GROUPING_COUNT_THRESHOLD = 10;
745 
747  vector CalculateRayStart();
748 };
749 
751 {
752  ref array<Object> Objects = new array<Object>;
753 }
ItemBase
Definition: inventoryitem.c:730
GetGame
proto native CGame GetGame()
CanBeActionTarget
override bool CanBeActionTarget()
Definition: woodbase.c:246
GetCursorHitPos
vector GetCursorHitPos()
Definition: actiontargets.c:141
DbgUI
Definition: dbgui.c:59
DayZPlayerUtils
private void DayZPlayerUtils()
cannot be instantiated
Definition: dayzplayerutils.c:461
DiagMenu
Definition: endebug.c:232
DayZPlayerCamera
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayer.c:56
VicinityObjects
objects in vicinity - extended with secondary object which is parent of that Object
Definition: actiontargets.c:2
Print
proto void Print(void var)
Prints content of variable to console/log.
m_Object
private Object m_Object
Definition: actiontargets.c:166
m_ComponentIndex
private int m_ComponentIndex
Definition: actiontargets.c:168
COLOR_YELLOW
const int COLOR_YELLOW
Definition: constants.c:67
ObjectGroup
Definition: actiontargets.c:750
RaycastRVResult
Definition: dayzphysics.c:98
GetUtility
float GetUtility()
Definition: actiontargets.c:138
UAMaxDistances
Definition: actionconstants.c:104
Colors
Definition: colors.c:3
m_VicinityObjects
private ref map< Object, Object > m_VicinityObjects
Definition: actiontargets.c:2
CollisionFlags
CollisionFlags
Definition: endebug.c:140
DumpToString
string DumpToString()
Definition: actiontargets.c:154
DiagMenuIDs
DiagMenuIDs
Definition: ediagmenuids.c:1
PlayerBase
Definition: playerbaseclient.c:1
GetComponentIndex
int GetComponentIndex()
Definition: actiontargets.c:135
RaycastRVParams
Definition: dayzphysics.c:49
map
map
Definition: controlsxboxnew.c:3
vector
Definition: enconvert.c:105
m_Utility
private float m_Utility
Definition: actiontargets.c:170
ActionTarget
class ActionTargets ActionTarget
m_CursorHitPos
private vector m_CursorHitPos
Definition: actiontargets.c:169
windowPosX
class PresenceNotifierNoiseEvents windowPosX
dbgUI settings
windowPosY
const int windowPosY
Definition: pluginpresencenotifier.c:80
ShapeFlags
ShapeFlags
Definition: endebug.c:125
g_Game
DayZGame g_Game
Definition: dayzgame.c:3727
VicinityObjects
void VicinityObjects()
Definition: actiontargets.c:4
Object
Definition: objecttyped.c:1
COLOR_BLUE_A
const int COLOR_BLUE_A
Definition: constants.c:71
ActionTargets
Definition: actiontargets.c:173
m_Parent
private Object m_Parent
Definition: actiontargets.c:167
GetObject
Object GetObject(int i)
returns VicinityObjects Key
Definition: actiontargets.c:79
COLOR_RED
const int COLOR_RED
Definition: constants.c:64
array< Object >
DbgPrintTargetDump
void DbgPrintTargetDump()
Definition: actiontargets.c:149
Debug
Definition: debug.c:13
DayZPhysics
Definition: dayzphysics.c:123
GetParent
Object GetParent(int i)
returns VicinityObjects Element
Definition: actiontargets.c:85
IsObjectObstructedCache
void IsObjectObstructedCache(vector rayCastStart, int totalObjects)
Definition: miscgameplayfunctions.c:1719
Math
Definition: enmath.c:6
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
SetCursorHitPos
void SetCursorHitPos(vector cursor_position)
Definition: actiontargets.c:144
COLOR_BLUE
const int COLOR_BLUE
Definition: constants.c:66
EntityAI
Definition: building.c:5
GetType
override int GetType()
Definition: huddebugwincharagents.c:49
PhxInteractionLayers
PhxInteractionLayers
Definition: dayzphysics.c:1
IsProxy
bool IsProxy()
Definition: actiontargets.c:128