DayZ 1.24
Loading...
Searching...
No Matches
Hologram Class Reference
Collaboration diagram for Hologram:
[legend]

Protected Member Functions

void Hologram (PlayerBase player, vector pos, ItemBase item)
 
void ~Hologram ()
 
void SetAnimations ()
 
void UpdateSelections ()
 
string ProjectionBasedOnParent ()
 
string GetProjectionName (ItemBase item)
 
void UpdateHologram (float timeslice)
 
vector AlignProjectionOnTerrain (float timeslice)
 
vector SmoothProjectionMovement (vector y_p_r, float timeslice)
 
void CreateTrigger ()
 
void RefreshTrigger ()
 
void EvaluateCollision (ItemBase action_item=null)
 
bool IsClippingRoof ()
 
bool IsCollidingAngle ()
 
bool IsCollidingBBox (ItemBase action_item=null)
 
bool IsBaseViable ()
 
bool IsCollidingGPlot ()
 
bool IsCollidingZeroPos ()
 
bool IsBehindObstacle ()
 DEPRECATED.
 
bool IsBaseStatic (Object objectToCheck)
 
bool IsObjectStatic (Object obj)
 
bool IsBaseIntact (Object under_left_close, Object under_right_close, Object under_left_far, Object under_right_far)
 
bool IsBaseFlat (vector contact_pos_left_close, vector contact_pos_right_close, vector contact_pos_left_far, vector contact_pos_right_far)
 
bool IsPlacementPermitted ()
 Checks if the item can be legally placed (usually checked by action as well)
 
bool HeightPlacementCheck ()
 Checks height relative to player's position.
 
bool IsUnderwater ()
 
bool IsInTerrain ()
 
void CheckPowerSource ()
 
EntityAI PlaceEntity (EntityAI entity_for_placing)
 
void GetProjectionCollisionBox (out vector min_max[2])
 
vector GetCollisionBoxSize (vector min_max[2])
 
vector GetLeftCloseProjectionVector ()
 
vector GetRightCloseProjectionVector ()
 
vector GetLeftFarProjectionVector ()
 
vector GetRightFarProjectionVector ()
 
bool IsSurfaceWater (vector position)
 
bool IsSurfaceSea (vector position)
 
vector GetProjectionEntityPosition (PlayerBase player)
 
bool SetHologramPosition (vector startPosition, float minProjectionDistance, float maxProjectionDistance, inout vector contactPosition)
 Sets hologram position based on player and projection distance.
 
bool IsFenceOrWatchtowerKit ()
 
vector CorrectForWatchtower (int contactComponent, vector contactPos, PlayerBase player, Object hitObject)
 
bool IsProjectionTrap ()
 
float GetProjectionDiameter ()
 
float GetProjectionRadius ()
 
void SetUpdatePosition (bool state)
 
bool GetUpdatePosition ()
 
EntityAI GetParentEntity ()
 
void SetProjectionEntity (EntityAI projection)
 
EntityAI GetProjectionEntity ()
 
void SetIsFloating (bool is_floating)
 
void SetIsColliding (bool is_colliding)
 
void SetIsHidden (bool is_hidden)
 
void SetIsCollidingPlayer (bool is_colliding)
 
void SetIsCollidingGPlot (bool is_colliding_gplot)
 
bool IsFloating ()
 
bool IsColliding ()
 
bool IsHidden ()
 
bool IsCollidingPlayer ()
 
void SetProjectionPosition (vector position)
 
void SetProjectionOrientation (vector orientation)
 
vector GetProjectionRotation ()
 
void AddProjectionRotation (float addition)
 
void SubtractProjectionRotation (float subtraction)
 
vector SetOnGround (vector position)
 
vector HideWhenClose (vector pos)
 
vector GetProjectionPosition ()
 
vector GetProjectionOrientation ()
 
vector GetDefaultOrientation ()
 
int GetHiddenSelection (string selection)
 
void SetSelectionToRefresh (string selection)
 
void SetSelectionToRefresh (array< string > selection)
 
void RefreshVisual ()
 
string CorrectMaterialPathName ()
 

Static Protected Member Functions

static bool DoesHaveProjection (ItemBase item)
 DEPRECATED.
 

Protected Attributes

const int SPAWN_FLAGS = ECE_LOCAL
 
const string SUFFIX_MATERIAL_DEPLOYABLE = "_deployable.rvmat"
 
const string SUFFIX_MATERIAL_UNDEPLOYABLE = "_undeployable.rvmat"
 
const string SUFFIX_MATERIAL_POWERED = "_powered.rvmat"
 
ItemBase m_Parent
 
EntityAI m_Projection
 
PlayerBase m_Player
 
ProjectionTrigger m_ProjectionTrigger
 
string m_ProjectionTypename
 
bool m_IsColliding
 
bool m_IsCollidingGPlot
 
bool m_IsSlope
 
bool m_IsCollidingPlayer
 
bool m_IsFloating
 
bool m_UpdatePosition
 
bool m_IsHidden
 
vector m_DefaultOrientation
 
vector m_Rotation
 
vector m_y_p_r_previous
 
vector m_ContactDir
 
vector m_FromAdjusted
 
const string ANIMATION_PLACING = "Placing"
 
const string ANIMATION_INVENTORY = "Inventory"
 
const string SELECTION_PLACING = "placing"
 
const string SELECTION_INVENTORY = "inventory"
 
const float SMALL_PROJECTION_RADIUS = 1
 
const float SMALL_PROJECTION_GROUND = 2
 
const float DISTANCE_SMALL_PROJECTION = 1
 
const float LARGE_PROJECTION_DISTANCE_LIMIT = 6
 Deprecated.
 
const float PROJECTION_TRANSITION_MIN = 1
 
const float PROJECTION_TRANSITION_MAX = 0.25
 
const float LOOKING_TO_SKY = 0.75
 
float m_SlopeTolerance
 
bool m_AlignToTerrain
 
vector m_YawPitchRollLimit
 
int m_ContactComponent
 
ref set< stringm_SelectionsToRefresh = new set<string>
 

Static Protected Attributes

static const float DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF = 1.5
 
ref array< stringm_WatchtowerIgnoreComponentNames = new array<string>
 
ref array< stringm_WatchtowerBlockedComponentNames = new array<string>
 

Private Member Functions

bool IsRestrictedFromAdvancedPlacing ()
 

Detailed Description

Definition at line 1 of file Hologram.c.

Constructor & Destructor Documentation

◆ Hologram()

void Hologram::Hologram ( PlayerBase player,
vector pos,
ItemBase item )
inlineprotected

Definition at line 65 of file Hologram.c.

66 {
68 m_Parent = item;
70
72 m_UpdatePosition = true;
74
75 m_Rotation = "0 0 0";
76 m_FromAdjusted = "0 0 0";
77
78 // If the static names are empty, generate the needed names
79 // Refer to their definitions to see why these are required
80 if (m_WatchtowerIgnoreComponentNames.Count() == 0)
81 {
82 string baseStringBegin = Watchtower.BASE_VIEW_NAME;
83 string baseIgnoreStringEnd = Watchtower.BASE_WALL_NAME;
84
85 int floors = Watchtower.MAX_WATCHTOWER_FLOORS;
86 int walls = Watchtower.MAX_WATCHTOWER_WALLS;
87
88 string compName;
89 for (int i = 1; i < floors + 1; ++i)
90 {
91 compName = baseStringBegin + i.ToString();
92 for (int j = 1; j < walls + 1; ++j)
94
95 if (i != 1)
97 else
99 }
100 }
101
102 string configPathProjectionTypename = string.Format("CfgVehicles %1 projectionTypename", m_Parent.GetType());
103 if (GetGame().ConfigIsExisting(configPathProjectionTypename))
105
107 if (GetGame().IsMultiplayer() && GetGame().IsServer())
108 {
110 projectionEntity.SetAllowDamage(false);
113 }
114 else
115 {
117 if (projectionEntity == null)
118 {
119 ErrorEx(string.Format("Cannot create hologram entity from config class %1", ProjectionBasedOnParent()), ErrorExSeverity.WARNING);
120 return;
121 }
122
127 }
128
129 if (ItemBase.Cast(projectionEntity))
130 ItemBase.Cast(GetProjectionEntity()).SetIsHologram(true);
131
132 string configPathSlope = string.Format("CfgVehicles %1 slopeTolerance", GetProjectionEntity().GetType());
133 if (GetGame().ConfigIsExisting(configPathSlope))
134 m_SlopeTolerance = GetGame().ConfigGetFloat(configPathSlope);
135
136 string configPathAlign = string.Format("CfgVehicles %1 alignHologramToTerain", GetProjectionEntity().GetType());
137 if (GetGame().ConfigIsExisting(configPathAlign))
138 m_AlignToTerrain = GetGame().ConfigGetInt(configPathAlign);
139
140 string configPathOrientationLimit = string.Format("CfgVehicles %1 yawPitchRollLimit", GetProjectionEntity().GetType());
141 if (GetGame().ConfigIsExisting(configPathOrientationLimit))
143 }
eBleedingSourceType GetType()
const int ECE_LOCAL
const int ECE_PLACE_ON_SURFACE
const int ECE_TRACE
void SetProjectionEntity(EntityAI projection)
Definition Hologram.c:1235
void SetAnimations()
Definition Hologram.c:161
EntityAI m_Projection
Definition Hologram.c:19
vector m_YawPitchRollLimit
Definition Hologram.c:53
ItemBase m_Parent
Definition Hologram.c:18
void CreateTrigger()
Definition Hologram.c:336
float m_SlopeTolerance
Definition Hologram.c:51
int m_ContactComponent
Definition Hologram.c:54
ref array< string > m_WatchtowerBlockedComponentNames
Definition Hologram.c:63
string m_ProjectionTypename
Definition Hologram.c:22
vector m_Rotation
Definition Hologram.c:33
PlayerBase m_Player
Definition Hologram.c:20
void RefreshTrigger()
Definition Hologram.c:347
bool m_UpdatePosition
Definition Hologram.c:29
vector m_FromAdjusted
Definition Hologram.c:36
bool m_AlignToTerrain
Definition Hologram.c:52
ProjectionTrigger m_ProjectionTrigger
Definition Hologram.c:21
EntityAI GetProjectionEntity()
Definition Hologram.c:1240
string ProjectionBasedOnParent()
Definition Hologram.c:198
ref array< string > m_WatchtowerIgnoreComponentNames
Definition Hologram.c:60
proto native CGame GetGame()
ErrorExSeverity
Definition EnDebug.c:62
enum ShapeType ErrorEx

References CreateTrigger(), ECE_LOCAL, ECE_PLACE_ON_SURFACE, ECE_TRACE, ErrorEx, GetGame(), GetProjectionEntity(), GetType(), m_AlignToTerrain, m_ContactComponent, m_FromAdjusted, m_Parent, m_Player, m_Projection, m_ProjectionTrigger, m_ProjectionTypename, m_Rotation, m_SlopeTolerance, m_UpdatePosition, m_WatchtowerBlockedComponentNames, m_WatchtowerIgnoreComponentNames, m_YawPitchRollLimit, ProjectionBasedOnParent(), RefreshTrigger(), SetAnimations(), and SetProjectionEntity().

◆ ~Hologram()

void Hologram::~Hologram ( )
inlineprotected

Definition at line 145 of file Hologram.c.

146 {
147 if (GetGame())
148 {
149 if (m_Projection)
150 GetGame().ObjectDelete(m_Projection);
151
153 GetGame().ObjectDelete(m_ProjectionTrigger);
154 }
155
156#ifdef DIAG_DEVELOPER
158#endif
159 }
void DestroyDebugCollisionBox()

References DestroyDebugCollisionBox(), GetGame(), m_Projection, and m_ProjectionTrigger.

Member Function Documentation

◆ AddProjectionRotation()

void Hologram::AddProjectionRotation ( float addition)
inlineprotected

Definition at line 1322 of file Hologram.c.

1323 {
1324 m_Rotation[0] = m_Rotation[0] + addition;
1325 }

References m_Rotation.

◆ AlignProjectionOnTerrain()

vector Hologram::AlignProjectionOnTerrain ( float timeslice)
inlineprotected

Definition at line 266 of file Hologram.c.

267 {
269
271 {
273 vector mat0[3];
274 vector mat1[3];
275 vector mat2[3];
278
279 if (m_ContactDir.Length() > 0)
281 else
282 normal = GetGame().SurfaceGetNormal(projection_position[0], projection_position[2]);
283
284 vector angles = normal.VectorToAngles();
285 angles[1] = angles[1] + 270;
286
287 angles[0] = Math.Clamp(angles[0], 0, 360);
288 angles[1] = Math.Clamp(angles[1], 0, 360);
289 angles[2] = Math.Clamp(angles[2], 0, 360);
290
292
296
298 }
299 else
300 {
302
303 if (y_p_r[0] > 180)
304 y_p_r[0] = y_p_r[0] - 360;
305
306 if (y_p_r[0] < -180)
307 y_p_r[0] = y_p_r[0] + 360;
308 }
309
311 }
vector m_ContactDir
Definition Hologram.c:35
vector SmoothProjectionMovement(vector y_p_r, float timeslice)
Definition Hologram.c:313
vector GetProjectionRotation()
Definition Hologram.c:1317
vector GetDefaultOrientation()
Definition Hologram.c:1412
Definition EnMath.c:7
proto native float Length()
Returns length of vector (magnitude)
static proto vector MatrixToAngles(vector mat[3])
Returns angles of rotation matrix.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.
static proto void MatrixMultiply3(vector mat0[3], vector mat1[3], out vector res[3])
Transforms rotation matrix.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

References Math::Clamp(), GetDefaultOrientation(), GetGame(), GetProjectionRotation(), vector::Length(), m_AlignToTerrain, m_ContactDir, m_Projection, Math3D::MatrixMultiply3(), Math3D::MatrixToAngles(), SmoothProjectionMovement(), and Math3D::YawPitchRollMatrix().

Referenced by UpdateHologram().

◆ CheckPowerSource()

void Hologram::CheckPowerSource ( )
inlineprotected

Definition at line 930 of file Hologram.c.

931 {
932 //in range of its power source.
933 if (m_Player && m_Parent && m_Parent.HasEnergyManager() && m_Parent.GetCompEM().IsPlugged())
934 {
935 // Unplug the device when the player is too far from the power source.
936 m_Parent.GetCompEM().UpdatePlugState();
937
938 // Delete local hologram when plug is rippled out and advanced placement is active
939 if (GetGame().IsMultiplayer() && GetGame().IsClient())
940 {
941 if (!m_Parent.GetCompEM().IsPlugged())
942 m_Player.TogglePlacingLocal();
943 }
944 }
945 }

References GetGame(), m_Parent, and m_Player.

Referenced by UpdateHologram().

◆ CorrectForWatchtower()

vector Hologram::CorrectForWatchtower ( int contactComponent,
vector contactPos,
PlayerBase player,
Object hitObject )
inlineprotected

Definition at line 1176 of file Hologram.c.

1177 {
1178 // Raycast has hit one of the trigger boxes that show construction prompts, so projection would be floating in the air without this correction
1179 if (m_WatchtowerIgnoreComponentNames.Find(hitObject.GetActionComponentName(contactComponent, LOD.NAME_VIEW)) != -1)
1180 contactPos[1] = hitObject.GetActionComponentPosition(contactComponent, LOD.NAME_VIEW)[1];
1181
1182 return contactPos;
1183 }
LOD class.
Definition gameplay.c:203
static const string NAME_VIEW
Definition gameplay.c:206

References m_WatchtowerIgnoreComponentNames, and LOD::NAME_VIEW.

Referenced by GetProjectionEntityPosition().

◆ CorrectMaterialPathName()

string Hologram::CorrectMaterialPathName ( )
inlineprotected

Definition at line 1470 of file Hologram.c.

1471 {
1472 if (IsColliding() || IsFloating())
1474 else if (m_Parent.HasEnergyManager())
1475 {
1477 string SEL_CORD_PLUGGED = m_Parent.GetCompEM().SEL_CORD_PLUGGED;
1478 string SEL_CORD_FOLDED = m_Parent.GetCompEM().SEL_CORD_FOLDED;
1479
1480 if (comp_em.IsPlugged() && comp_em.IsEnergySourceAtReach(GetProjectionPosition()))
1481 {
1482 m_Projection.SetAnimationPhase(SEL_CORD_PLUGGED, 0);
1483 m_Projection.SetAnimationPhase(SEL_CORD_FOLDED, 1);
1485 }
1486 else
1487 {
1488 m_Projection.SetAnimationPhase(SEL_CORD_PLUGGED, 1);
1489 m_Projection.SetAnimationPhase(SEL_CORD_FOLDED, 0);
1490 }
1491 }
1492
1494 }
const string SUFFIX_MATERIAL_DEPLOYABLE
Definition Hologram.c:14
bool IsColliding()
Definition Hologram.c:1281
const string SUFFIX_MATERIAL_UNDEPLOYABLE
Definition Hologram.c:15
vector GetProjectionPosition()
Definition Hologram.c:1396
bool IsFloating()
Definition Hologram.c:1273
const string SUFFIX_MATERIAL_POWERED
Definition Hologram.c:16
const string SEL_CORD_PLUGGED
const string SEL_CORD_FOLDED

References GetProjectionPosition(), IsColliding(), IsFloating(), m_Parent, m_Projection, ItemBase::SEL_CORD_FOLDED, ItemBase::SEL_CORD_PLUGGED, SUFFIX_MATERIAL_DEPLOYABLE, SUFFIX_MATERIAL_POWERED, and SUFFIX_MATERIAL_UNDEPLOYABLE.

Referenced by RefreshVisual().

◆ CreateTrigger()

void Hologram::CreateTrigger ( )
inlineprotected

Definition at line 336 of file Hologram.c.

337 {
338 Class.CastTo(m_ProjectionTrigger, g_Game.CreateObjectEx("ProjectionTrigger", GetProjectionPosition(), SPAWN_FLAGS));
339
341 m_ProjectionTrigger.SetParentObject(this);
342 m_ProjectionTrigger.SetParentOwner(m_Player);
343
345 }
DayZGame g_Game
Definition DayZGame.c:3528
Super root of all classes in Enforce script.
Definition EnScript.c:11
void RefreshVisual()
Definition Hologram.c:1446
vector GetProjectionOrientation()
Definition Hologram.c:1404
const int SPAWN_FLAGS
Definition Hologram.c:6
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), g_Game, GetProjectionOrientation(), GetProjectionPosition(), m_Player, m_ProjectionTrigger, RefreshVisual(), and SPAWN_FLAGS.

Referenced by Hologram().

◆ DoesHaveProjection()

static bool Hologram::DoesHaveProjection ( ItemBase item)
inlinestaticprotected

DEPRECATED.

Definition at line 223 of file Hologram.c.

224 {
225 return item && (item.IsDeployable() || item.CanMakeGardenplot() || item.IsInherited(DeployableContainer_Base));
226 }

◆ EvaluateCollision()

void Hologram::EvaluateCollision ( ItemBase action_item = null)
inlineprotected

Definition at line 393 of file Hologram.c.

394 {
395#ifdef DIAG_DEVELOPER
397#endif
398
399 if (!m_Player.CanPlaceItem(m_Projection))
400 {
401#ifdef DIAG_DEVELOPER
402 m_CollisionDetails += "[Player]";
403#endif
404 SetIsColliding(true);
405
406 }
408 SetIsColliding(true);
409 else if (m_Projection.IsInherited(TrapSpawnBase))
410 {
411#ifdef DIAG_DEVELOPER
412 DebugText("Inherits from TrapSpawnBase, checking IsPlaceableAtposition", true);
413#endif
414
417 SetIsColliding(!trapSpawnBase.IsPlaceableAtPosition(m_Projection.GetPosition()));
418 }
419 else if (m_Projection.IsInherited(TrapBase))
420 {
421#ifdef DIAG_DEVELOPER
422 DebugText("Inherits from TrapBase, checking IsPlaceableAtposition", true);
423#endif
426 SetIsColliding(!trapBase.IsPlaceableAtPosition(m_Projection.GetPosition()));
427 }
428 else
429 SetIsColliding(false);
430 }
bool IsCollidingZeroPos()
Definition Hologram.c:618
bool IsInTerrain()
Definition Hologram.c:843
bool HeightPlacementCheck()
Checks height relative to player's position.
Definition Hologram.c:776
bool IsUnderwater()
Definition Hologram.c:800
bool IsCollidingAngle()
Definition Hologram.c:464
bool IsCollidingGPlot()
Definition Hologram.c:606
bool IsPlacementPermitted()
Checks if the item can be legally placed (usually checked by action as well)
Definition Hologram.c:762
bool IsCollidingBBox(ItemBase action_item=null)
Definition Hologram.c:497
bool IsBaseViable()
Definition Hologram.c:544
void SetIsColliding(bool is_colliding)
Definition Hologram.c:1250
bool IsCollidingPlayer()
Definition Hologram.c:1294
bool IsClippingRoof()
Definition Hologram.c:432
bool IsHidden()
Definition Hologram.c:1286

References Class::CastTo(), HeightPlacementCheck(), IsBaseViable(), IsClippingRoof(), IsCollidingAngle(), IsCollidingBBox(), IsCollidingGPlot(), IsCollidingPlayer(), IsCollidingZeroPos(), IsFloating(), IsHidden(), IsInTerrain(), IsPlacementPermitted(), IsUnderwater(), m_Player, m_Projection, and SetIsColliding().

Referenced by UpdateHologram().

◆ GetCollisionBoxSize()

vector Hologram::GetCollisionBoxSize ( vector min_max[2])
inlineprotected

Definition at line 977 of file Hologram.c.

978 {
979 vector box_size = Vector(1, 1, 1);
980
981 box_size[0] = min_max[1][0] - min_max[0][0];
982 box_size[2] = min_max[1][2] - min_max[0][2];
983 box_size[1] = min_max[1][1] - min_max[0][1];
984
985 return box_size;
986 }
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

References Vector().

Referenced by GetProjectionDiameter(), GetProjectionRadius(), and IsCollidingBBox().

◆ GetDefaultOrientation()

vector Hologram::GetDefaultOrientation ( )
inlineprotected

Definition at line 1412 of file Hologram.c.

1413 {
1414 m_DefaultOrientation = GetGame().GetCurrentCameraDirection().VectorToAngles();
1415 m_DefaultOrientation[1] = 0;
1416
1417 if (!GetParentEntity().PlacementCanBeRotated())
1419
1420 return m_DefaultOrientation;
1421 }
vector m_DefaultOrientation
Definition Hologram.c:32
EntityAI GetParentEntity()
Definition Hologram.c:1230
static const vector Zero
Definition EnConvert.c:110

References GetGame(), GetParentEntity(), m_DefaultOrientation, and vector::Zero.

Referenced by AlignProjectionOnTerrain().

◆ GetHiddenSelection()

int Hologram::GetHiddenSelection ( string selection)
inlineprotected

Definition at line 1423 of file Hologram.c.

1424 {
1425 int idx = m_Projection.GetHiddenSelectionIndex(selection);
1426
1427 if (idx != -1)
1428 return idx;
1429 else
1430 return 0;
1431 }

References m_Projection.

Referenced by RefreshVisual().

◆ GetLeftCloseProjectionVector()

vector Hologram::GetLeftCloseProjectionVector ( )
inlineprotected

Definition at line 988 of file Hologram.c.

989 {
990 vector min_max[2];
992
993 return min_max[0];
994 }
void GetProjectionCollisionBox(out vector min_max[2])
Definition Hologram.c:966

References GetProjectionCollisionBox().

Referenced by IsBaseViable(), IsInTerrain(), and IsUnderwater().

◆ GetLeftFarProjectionVector()

vector Hologram::GetLeftFarProjectionVector ( )
inlineprotected

Definition at line 1006 of file Hologram.c.

1007 {
1008 vector min_max[2];
1010 min_max[0][2] = min_max[1][2];
1011
1012 return min_max[0];
1013 }

References GetProjectionCollisionBox().

Referenced by IsBaseViable(), IsInTerrain(), and IsUnderwater().

◆ GetParentEntity()

EntityAI Hologram::GetParentEntity ( )
inlineprotected

Definition at line 1230 of file Hologram.c.

1231 {
1232 return m_Parent;
1233 }

References m_Parent.

Referenced by GetDefaultOrientation().

◆ GetProjectionCollisionBox()

void Hologram::GetProjectionCollisionBox ( out vector min_max[2])
inlineprotected

Definition at line 966 of file Hologram.c.

967 {
968 if (!m_Projection.GetCollisionBox(min_max) && m_Projection.MemoryPointExists("box_placing_min"))
969 {
970 min_max[0] = m_Projection.GetMemoryPointPos("box_placing_min");
971 min_max[1] = m_Projection.GetMemoryPointPos("box_placing_max");
972 //Debug.DrawSphere(m_Projection.ModelToWorld(min_max[0]) , 0.8,Colors.RED, ShapeFlags.ONCE);
973 //Debug.DrawSphere(m_Projection.ModelToWorld(min_max[1]), 0.8,Colors.RED, ShapeFlags.ONCE);
974 }
975 }

References m_Projection.

Referenced by GetLeftCloseProjectionVector(), GetLeftFarProjectionVector(), GetProjectionDiameter(), GetProjectionRadius(), GetRightCloseProjectionVector(), GetRightFarProjectionVector(), IsCollidingBBox(), and RefreshTrigger().

◆ GetProjectionDiameter()

float Hologram::GetProjectionDiameter ( )
inlineprotected

Definition at line 1191 of file Hologram.c.

1192 {
1193 float diameter;
1194 float radius;
1196 vector min_max[2];
1197
1200 diameter = diagonal.Length();
1201
1202 return diameter;
1203 }
vector GetCollisionBoxSize(vector min_max[2])
Definition Hologram.c:977

References GetCollisionBoxSize(), and GetProjectionCollisionBox().

Referenced by SetOnGround().

◆ GetProjectionEntity()

EntityAI Hologram::GetProjectionEntity ( )
inlineprotected

Definition at line 1240 of file Hologram.c.

1241 {
1242 return m_Projection;
1243 }

References m_Projection.

Referenced by HeightPlacementCheck(), Hologram(), and PlaceEntity().

◆ GetProjectionEntityPosition()

vector Hologram::GetProjectionEntityPosition ( PlayerBase player)
inlineprotected

will not push hologram up when there is direct hit of an item

Definition at line 1037 of file Hologram.c.

1038 {
1042 vector minMax[2];
1044 float cameraToPlayerDistance = vector.Distance(GetGame().GetCurrentCameraPosition(), player.GetPosition());
1045
1046 if (projectionRadius < SMALL_PROJECTION_RADIUS) // objects with radius smaller than 1m
1047 {
1050 }
1051 else
1052 {
1056 }
1057
1058 vector from = GetGame().GetCurrentCameraPosition();
1059 //adjusts raycast origin to player head approx. level (limits results behind the character)
1060 if (DayZPlayerCamera3rdPerson.Cast(player.GetCurrentCamera()))
1061 {
1063 MiscGameplayFunctions.GetHeadBonePos(player, head_pos);
1064 float dist = vector.Distance(head_pos, from);
1065 from = from + GetGame().GetCurrentCameraDirection() * dist;
1066 }
1067
1068 vector to = from + (GetGame().GetCurrentCameraDirection() * (maxProjectionDistance + cameraToPlayerDistance));
1071
1073
1074 bool contactHitProcessed = false;
1077 {
1078 if (hitObjects.Count() > 0)
1079 {
1080 if (hitObjects[0].IsInherited(Watchtower))
1081 {
1082 contactHitProcessed = true;
1084 }
1085
1086 if (!contactHitProcessed && hitObjects[0].IsInherited(InventoryItem))
1087 contactPosition = hitObjects[0].GetPosition();
1088 }
1089 }
1090
1091 static const float raycastOriginOffsetOnFail = 0.25;
1092 static const float minDistFromStart = 0.01;
1093 // Camera isn't correctly positioned in some cases, leading to raycasts hitting the object directly behind the camera
1095 {
1096 from = contactPosition + GetGame().GetCurrentCameraDirection() * raycastOriginOffsetOnFail;
1098 }
1099
1102
1103#ifdef DIAG_DEVELOPER
1105 if (DiagMenu.GetBool(DiagMenuIDs.MISC_HOLOGRAM))
1106 Debug.DrawSphere(GetProjectionPosition(), 0.1, 0x99FF0000, ShapeFlags.ONCE | ShapeFlags.TRANSP | ShapeFlags.NOOUTLINE);
1107#endif
1108
1110
1111 return contactPosition;
1112 }
void DayZPlayerCamera3rdPerson(DayZPlayer pPlayer, HumanInputController pInput)
DiagMenuIDs
Definition EDiagMenuIDs.c:2
static bool GetDisableIsCollidingBBoxCheck()
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
Definition Debug.c:14
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
Definition Debug.c:434
const float LARGE_PROJECTION_DISTANCE_LIMIT
Deprecated.
Definition Hologram.c:45
const float SMALL_PROJECTION_RADIUS
Definition Hologram.c:42
bool SetHologramPosition(vector startPosition, float minProjectionDistance, float maxProjectionDistance, inout vector contactPosition)
Sets hologram position based on player and projection distance.
Definition Hologram.c:1122
void SetIsFloating(bool is_floating)
Definition Hologram.c:1245
vector CorrectForWatchtower(int contactComponent, vector contactPos, PlayerBase player, Object hitObject)
Definition Hologram.c:1176
float GetProjectionRadius()
Definition Hologram.c:1205
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
ShapeFlags
Definition EnDebug.c:126
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.

References Math::Clamp(), CorrectForWatchtower(), DayZPlayerCamera3rdPerson(), vector::Distance(), vector::DistanceSq(), Debug::DrawSphere(), DiagMenu::GetBool(), CfgGameplayHandler::GetDisableIsCollidingBBoxCheck(), GetGame(), GetProjectionPosition(), GetProjectionRadius(), LARGE_PROJECTION_DISTANCE_LIMIT, m_ContactComponent, m_ContactDir, m_FromAdjusted, m_Projection, DayZPhysics::RaycastRV(), SetHologramPosition(), SetIsFloating(), SMALL_PROJECTION_RADIUS, and vector::Zero.

Referenced by UpdateHologram().

◆ GetProjectionName()

string Hologram::GetProjectionName ( ItemBase item)
inlineprotected

configuration override

Definition at line 203 of file Hologram.c.

204 {
206 if (m_ProjectionTypename != "")
208
209 if (!item)
210 return "";
211
212 if (item.CanMakeGardenplot())
213 return "GardenPlotPlacing";
214
215 //Camping & Base building
216 if (item.IsInherited(TentBase) || item.IsBasebuildingKit())
217 return item.GetType() + "Placing";
218
219 return item.GetType();
220 }

References m_ProjectionTypename.

Referenced by ProjectionBasedOnParent().

◆ GetProjectionOrientation()

vector Hologram::GetProjectionOrientation ( )
inlineprotected

Definition at line 1404 of file Hologram.c.

1405 {
1406 if (m_Projection)
1407 return m_Projection.GetOrientation();
1408
1409 return vector.Zero;
1410 }

References m_Projection, and vector::Zero.

Referenced by CreateTrigger(), IsCollidingBBox(), and RefreshTrigger().

◆ GetProjectionPosition()

vector Hologram::GetProjectionPosition ( )
inlineprotected

Definition at line 1396 of file Hologram.c.

1397 {
1398 if (m_Projection)
1399 return m_Projection.GetPosition();
1400
1401 return vector.Zero;
1402 }

References m_Projection, and vector::Zero.

Referenced by CorrectMaterialPathName(), CreateTrigger(), GetProjectionEntityPosition(), HeightPlacementCheck(), IsBaseFlat(), IsCollidingZeroPos(), IsPlacementPermitted(), and RefreshTrigger().

◆ GetProjectionRadius()

float Hologram::GetProjectionRadius ( )
inlineprotected

Definition at line 1205 of file Hologram.c.

1206 {
1207 float diameter;
1208 float radius;
1210 vector min_max[2];
1211
1214 diameter = diagonal.Length();
1215 radius = diameter / 2;
1216
1217 return radius;
1218 }

References GetCollisionBoxSize(), and GetProjectionCollisionBox().

Referenced by GetProjectionEntityPosition().

◆ GetProjectionRotation()

vector Hologram::GetProjectionRotation ( )
inlineprotected

Definition at line 1317 of file Hologram.c.

1318 {
1319 return m_Rotation;
1320 }

References m_Rotation.

Referenced by AlignProjectionOnTerrain().

◆ GetRightCloseProjectionVector()

vector Hologram::GetRightCloseProjectionVector ( )
inlineprotected

Definition at line 996 of file Hologram.c.

997 {
998 vector min_max[2];
1000 min_max[1][1] = min_max[0][1];
1001 min_max[1][2] = min_max[0][2];
1002
1003 return min_max[1];
1004 }

References GetProjectionCollisionBox().

Referenced by IsBaseViable(), IsInTerrain(), and IsUnderwater().

◆ GetRightFarProjectionVector()

vector Hologram::GetRightFarProjectionVector ( )
inlineprotected

Definition at line 1015 of file Hologram.c.

1016 {
1017 vector min_max[2];
1019 min_max[1][1] = min_max[0][1];
1020
1021 return min_max[1];
1022 }

References GetProjectionCollisionBox().

Referenced by IsBaseViable(), IsInTerrain(), and IsUnderwater().

◆ GetUpdatePosition()

bool Hologram::GetUpdatePosition ( )
inlineprotected

Definition at line 1225 of file Hologram.c.

1226 {
1227 return m_UpdatePosition;
1228 }

References m_UpdatePosition.

Referenced by UpdateHologram().

◆ HeightPlacementCheck()

bool Hologram::HeightPlacementCheck ( )
inlineprotected

Checks height relative to player's position.

Definition at line 776 of file Hologram.c.

777 {
779 return true;
780 if (GetProjectionEntity()) //simple height check
781 {
782 vector playerpos = m_Player.GetPosition();
784 float delta1 = playerpos[1] - projectionpos[1];
785
787 {
788#ifdef DIAG_DEVELOPER
789 DebugText("HeightPlacementCheck(must be true): ", true, false, " | Height difference between item and player is larger than " + DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF);
790#endif
791 return false;
792 }
793 }
794#ifdef DIAG_DEVELOPER
795 DebugText("HeightPlacementCheck(must be true): ", true, true);
796#endif
797 return true;
798 }
static bool GetDisableHeightPlacementCheck()
static const float DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF
Definition Hologram.c:49

References DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF, CfgGameplayHandler::GetDisableHeightPlacementCheck(), GetProjectionEntity(), GetProjectionPosition(), and m_Player.

Referenced by EvaluateCollision().

◆ HideWhenClose()

vector Hologram::HideWhenClose ( vector pos)
inlineprotected

Definition at line 1385 of file Hologram.c.

1386 {
1387 //if the hologram is too close to player when he looks to the sky, send the projection to away
1388 vector cam_dir = GetGame().GetCurrentCameraDirection();
1389
1390 if (cam_dir[1] > LOOKING_TO_SKY)
1391 pos = "0 0 0";
1392
1393 return pos;
1394 }
const float LOOKING_TO_SKY
Definition Hologram.c:48

References GetGame(), and LOOKING_TO_SKY.

Referenced by SetOnGround().

◆ IsBaseFlat()

bool Hologram::IsBaseFlat ( vector contact_pos_left_close,
vector contact_pos_right_close,
vector contact_pos_left_far,
vector contact_pos_right_far )
inlineprotected

Definition at line 741 of file Hologram.c.

References Math::AbsFloat(), GetProjectionPosition(), and m_SlopeTolerance.

Referenced by IsBaseViable().

◆ IsBaseIntact()

bool Hologram::IsBaseIntact ( Object under_left_close,
Object under_right_close,
Object under_left_far,
Object under_right_far )
inlineprotected

Definition at line 655 of file Hologram.c.

656 {
658#ifdef DIAG_DEVELOPER
659 DebugText("IsBaseIntact(must be true and all equal): ", true, isTrue, " | ulc: " + Object.GetDebugName(under_left_close) + " | urc: " + Object.GetDebugName(under_right_close) + " | ulf: " + Object.GetDebugName(under_left_far) + " | urf: " + Object.GetDebugName(under_right_far));
660 if (!isTrue)
661 {
665 conditions.Insert(under_left_far == null);
667
668 int amountOfNull = 0;
669 if (!under_left_close)
670 ++amountOfNull;
672 ++amountOfNull;
673 if (!under_left_far)
674 ++amountOfNull;
675 if (!under_right_far)
676 ++amountOfNull;
677
678 if (amountOfNull < 3)
679 for (int i = 0; i < conditions.Count(); ++i)
681
683 }
684#endif
685
686 return isTrue;
687 }

Referenced by IsBaseViable().

◆ IsBaseStatic()

bool Hologram::IsBaseStatic ( Object objectToCheck)
inlineprotected

Definition at line 637 of file Hologram.c.

638 {
639 //check if the object below hologram is dynamic object. Dynamic objects like barrels can be taken to hands
640 //and item which had been placed on top of them, would stay floating in the air
641#ifdef DIAG_DEVELOPER
642 if (objectToCheck == null)
643 DebugText("IsBaseStatic(must be true): ", true, true, " | objectToCheck is null (this is good)");
644 else
645 DebugText("IsBaseStatic(must be true): ", true, IsObjectStatic(objectToCheck));
646#endif
648 }
bool IsObjectStatic(Object obj)
Definition Hologram.c:650

References IsObjectStatic().

Referenced by IsBaseViable().

◆ IsBaseViable()

bool Hologram::IsBaseViable ( )
inlineprotected

Definition at line 544 of file Hologram.c.

545 {
546 //This function is not required to solve server-side fixes for clipping, saves calculations and potential false negatives
547 if (GetGame().IsServer() && GetGame().IsMultiplayer())
548 return true;
549
551 return true;
552
555
558
561
564
585
586 //Not sure what the intention here was before, but it boiled down to a very bloated version of what you see here right now
588 if (results_left_close.Count() > 0)
590
592 if (results_right_close.Count() > 0)
594
596 if (results_left_far.Count() > 0)
598
600 if (results_right_far.Count() > 0)
602
604 }
static bool GetDisableIsBaseViableCheck()
bool IsBaseIntact(Object under_left_close, Object under_right_close, Object under_left_far, Object under_right_far)
Definition Hologram.c:655
vector GetLeftFarProjectionVector()
Definition Hologram.c:1006
vector GetRightFarProjectionVector()
Definition Hologram.c:1015
vector GetLeftCloseProjectionVector()
Definition Hologram.c:988
vector GetRightCloseProjectionVector()
Definition Hologram.c:996
bool IsBaseFlat(vector contact_pos_left_close, vector contact_pos_right_close, vector contact_pos_left_far, vector contact_pos_right_far)
Definition Hologram.c:741
bool IsBaseStatic(Object objectToCheck)
Definition Hologram.c:637

References CfgGameplayHandler::GetDisableIsBaseViableCheck(), GetGame(), GetLeftCloseProjectionVector(), GetLeftFarProjectionVector(), GetRightCloseProjectionVector(), GetRightFarProjectionVector(), IsBaseFlat(), IsBaseIntact(), IsBaseStatic(), m_Projection, and DayZPhysics::RaycastRV().

Referenced by EvaluateCollision().

◆ IsBehindObstacle()

bool Hologram::IsBehindObstacle ( )
inlineprotected

DEPRECATED.

Definition at line 630 of file Hologram.c.

631 {
632 ErrorEx("Deprecated check - do not use", ErrorExSeverity.WARNING);
633 return false;
634 }

References ErrorEx.

◆ IsClippingRoof()

bool Hologram::IsClippingRoof ( )
inlineprotected

Definition at line 432 of file Hologram.c.

433 {
435 return false;
436 if (GetGame().IsServer() && GetGame().IsMultiplayer())
437 return false;
438
439 //Some locations allow you to look up and attempt placing the hologram on the bottom side of a floor - most notably the floors of a watchtower
440 //This check also prevents some very unnatural placements
441
442 bool b1 = m_Projection.GetPosition()[1] > GetGame().GetCurrentCameraPosition()[1];
443 bool b2 = false;
444#ifdef DIAG_DEVELOPER
445 vector from, to;
446#endif
447 if (m_Projection.DoPlacingHeightCheck())
448 {
450#ifdef DIAG_DEVELOPER
451 MiscGameplayFunctions.IsUnderRoofFromToCalculation(m_Projection, from, to);
452 DrawArrow(from, to, !b2);
453#endif
454 }
455
456#ifdef DIAG_DEVELOPER
457 DebugText("IsClippingRoof: ", false, b1, " | (projection height) " + m_Projection.GetPosition()[1] + " > (camera height) " + GetGame().GetCurrentCameraPosition()[1]);
458 DebugText("IsClippingRoof: ", false, b2, " | (DoPlacingHeightCheck) " + m_Projection.DoPlacingHeightCheck() + " && (IsUnderRoof) " + MiscGameplayFunctions.IsUnderRoof(m_Projection) + " | from: " + from[1] + " | to: " + to[1]);
459#endif
460
461 return b1 || b2;
462 }
static bool GetDisableIsClippingRoofCheck()
const float ROOF_CHECK_RAYCAST_DIST
Definition constants.c:867

References CfgGameplayHandler::GetDisableIsClippingRoofCheck(), GetGame(), m_Projection, and GameConstants::ROOF_CHECK_RAYCAST_DIST.

Referenced by EvaluateCollision().

◆ IsColliding()

bool Hologram::IsColliding ( )
inlineprotected

Definition at line 1281 of file Hologram.c.

1282 {
1283 return m_IsColliding;
1284 }
bool m_IsColliding
Definition Hologram.c:24

References m_IsColliding.

Referenced by CorrectMaterialPathName().

◆ IsCollidingAngle()

bool Hologram::IsCollidingAngle ( )
inlineprotected

Definition at line 464 of file Hologram.c.

465 {
467 return false;
468 vector projection_orientation = m_Projection.GetOrientation();
470#ifdef DIAG_DEVELOPER
471 DebugText("IsCollidingAngle: ", false, isTrue, " | (proj pitch) " + Math.AbsFloat(projection_orientation[1]) + " > (pitch limit) " + m_YawPitchRollLimit[1] + " | (proj roll) " + Math.AbsFloat(projection_orientation[2]) + " > (roll limit) " + m_YawPitchRollLimit[2]);
472#endif
473
474 return isTrue;
475 }
static bool GetDisableIsCollidingAngleCheck()

References Math::AbsFloat(), CfgGameplayHandler::GetDisableIsCollidingAngleCheck(), m_Projection, and m_YawPitchRollLimit.

Referenced by EvaluateCollision().

◆ IsCollidingBBox()

bool Hologram::IsCollidingBBox ( ItemBase action_item = null)
inlineprotected

Definition at line 497 of file Hologram.c.

498 {
500 return false;
501
503 vector relativeOffset; //we need to lift BBox, because it is calculated from the bottom of projection, and not from the middle
504 vector absoluteOffset = "0 0.05 0"; //we need to lift BBox even more, because it colliddes with house floors due to various reasons (probably geometry or float imperfections)
507 vector minMax[2];
510
512 relativeOffset[1] = (minMax[1][1] - minMax[0][1]) * 0.5;
517
518 if (action_item)
520
521 //add is construction check
522 // Base building objects behave in a way that causes this test to generate false positives
524#ifdef DIAG_DEVELOPER
525 if (DiagMenu.GetBool(DiagMenuIDs.MISC_HOLOGRAM))
526 {
527 string text = "";
528 foreach (Object object: collidedObjects)
529 text += " | " + Object.GetDebugName(object);
530
531 DebugText("IsCollidingBBox: ", false, isTrue, text);
532
533 int color = 0x01FFFFFF;
534 if (isTrue)
535 color = 0x33F22613;
536
538 }
539#endif
540
541 return isTrue;
542 }
void DrawDebugCollisionBox(vector min_max[2], int color)
override string GetDebugName()

References DrawDebugCollisionBox(), DiagMenu::GetBool(), GetCollisionBoxSize(), CfgGameplayHandler::GetDisableIsCollidingBBoxCheck(), GetGame(), GetProjectionCollisionBox(), GetProjectionOrientation(), m_Player, and m_Projection.

Referenced by EvaluateCollision().

◆ IsCollidingGPlot()

bool Hologram::IsCollidingGPlot ( )
inlineprotected

Definition at line 606 of file Hologram.c.

607 {
609 return false;
610
611#ifdef DIAG_DEVELOPER
612 DebugText("IsCollidingGPlot: ", false, m_IsCollidingGPlot);
613#endif
614
615 return m_IsCollidingGPlot;
616 }
static bool GetDisableIsCollidingGPlotCheck()
bool m_IsCollidingGPlot
Definition Hologram.c:25

References CfgGameplayHandler::GetDisableIsCollidingGPlotCheck(), and m_IsCollidingGPlot.

Referenced by EvaluateCollision().

◆ IsCollidingPlayer()

bool Hologram::IsCollidingPlayer ( )
inlineprotected

Definition at line 1294 of file Hologram.c.

1295 {
1297 return false;
1298#ifdef DIAG_DEVELOPER
1299 DebugText("IsCollidingPlayer: ", false, m_IsCollidingPlayer);
1300#endif
1301 return m_IsCollidingPlayer;
1302 }
static bool GetDisableIsCollidingPlayerCheck()
bool m_IsCollidingPlayer
Definition Hologram.c:27

References CfgGameplayHandler::GetDisableIsCollidingPlayerCheck(), and m_IsCollidingPlayer.

Referenced by EvaluateCollision().

◆ IsCollidingZeroPos()

bool Hologram::IsCollidingZeroPos ( )
inlineprotected

Definition at line 618 of file Hologram.c.

619 {
620 vector origin = Vector(0, 0, 0);
622#ifdef DIAG_DEVELOPER
623 DebugText("IsCollidingZeroPos: ", false, isTrue);
624#endif
625
626 return isTrue;
627 }

References GetProjectionPosition(), and Vector().

Referenced by EvaluateCollision().

◆ IsFenceOrWatchtowerKit()

bool Hologram::IsFenceOrWatchtowerKit ( )
inlineprotected

Definition at line 1171 of file Hologram.c.

1172 {
1173 return m_Parent.IsBasebuildingKit() || m_Parent.IsInherited(TentBase);
1174 }
override bool IsBasebuildingKit()
Definition KitBase.c:17

References ItemBase::IsBasebuildingKit(), and m_Parent.

◆ IsFloating()

bool Hologram::IsFloating ( )
inlineprotected

Definition at line 1273 of file Hologram.c.

1274 {
1275#ifdef DIAG_DEVELOPER
1276 DebugText("IsFloating: ", false, m_IsFloating);
1277#endif
1278 return m_IsFloating;
1279 }
bool m_IsFloating
Definition Hologram.c:28

References m_IsFloating.

Referenced by CorrectMaterialPathName(), EvaluateCollision(), and SetProjectionPosition().

◆ IsHidden()

bool Hologram::IsHidden ( )
inlineprotected

Definition at line 1286 of file Hologram.c.

1287 {
1288#ifdef DIAG_DEVELOPER
1289 DebugText("IsHidden: ", false, m_IsHidden);
1290#endif
1291 return m_IsHidden;
1292 }
bool m_IsHidden
Definition Hologram.c:30

References m_IsHidden.

Referenced by EvaluateCollision().

◆ IsInTerrain()

bool Hologram::IsInTerrain ( )
inlineprotected

Definition at line 843 of file Hologram.c.

844 {
846 return false;
847 vector fromHeightOffset = "0 0.3 0";
848 vector toHeightOffset = "0 1 0";
849
852
855
858
861
866
871
876
877#ifdef DIAG_DEVELOPER
878 // I'd rather duplicate this on internal than introduce (even) more raycasts than needed on retail..
887 bool isTrue = (lc || rc || lf || rf);
888 string text = "";
889 if (isTrue)
890 {
891 if (lc)
892 text += " | lc";
893 if (rc)
894 text += " | rc";
895 if (lf)
896 text += " | lf";
897 if (rf)
898 text += " | rf";
899
900 if (lcO.Count() > 0)
901 text += " | lcO: " + lcO[0];
902 if (rcO.Count() > 0)
903 text += " | rcO: " + rcO[0];
904 if (lfO.Count() > 0)
905 text += " | lfO: " + lfO[0];
906 if (rfO.Count() > 0)
907 text += " | rfO: " + rfO[0];
908
909 array<bool> conditions = {!lc, !rc, !lf, !rf};
911 }
912 DebugText("IsInTerrain: ", false, isTrue, text);
913#endif
914
916 return true;
917
919 return true;
920
922 return true;
923
925 return true;
926
927 return false;
928 }
static bool GetDisableIsInTerrainCheck()

References CfgGameplayHandler::GetDisableIsInTerrainCheck(), GetLeftCloseProjectionVector(), GetLeftFarProjectionVector(), GetRightCloseProjectionVector(), GetRightFarProjectionVector(), m_Projection, and DayZPhysics::RaycastRV().

Referenced by EvaluateCollision().

◆ IsObjectStatic()

bool Hologram::IsObjectStatic ( Object obj)
inlineprotected

Definition at line 650 of file Hologram.c.

651 {
652 return obj.IsBuilding() || obj.IsPlainObject() || (!m_Parent.IsInherited(KitBase) && obj.IsInherited(BaseBuildingBase) && (m_WatchtowerBlockedComponentNames.Find(obj.GetActionComponentName(m_ContactComponent, LOD.NAME_VIEW)) == -1));
653 }

References m_ContactComponent, m_Parent, m_WatchtowerBlockedComponentNames, and LOD::NAME_VIEW.

Referenced by IsBaseStatic().

◆ IsPlacementPermitted()

bool Hologram::IsPlacementPermitted ( )
inlineprotected

Checks if the item can be legally placed (usually checked by action as well)

Definition at line 762 of file Hologram.c.

763 {
765 return true;
766
768
769#ifdef DIAG_DEVELOPER
770 DebugText("IsPlacementPermitted(must be true): ", true, isTrue, " (Note: ItemBase::CanBePlaced() return value)");
771#endif
772 return isTrue;
773 }
static bool GetDisableIsPlacementPermittedCheck()
override bool CanBePlaced(Man player, vector position)
Definition TentBase.c:917

References ItemBase::CanBePlaced(), CfgGameplayHandler::GetDisableIsPlacementPermittedCheck(), GetProjectionPosition(), m_Parent, and m_Player.

Referenced by EvaluateCollision().

◆ IsProjectionTrap()

bool Hologram::IsProjectionTrap ( )
inlineprotected

Definition at line 1186 of file Hologram.c.

1187 {
1188 return m_Projection.IsInherited(TrapBase) || m_Projection.IsInherited(TrapSpawnBase);
1189 }

References m_Projection.

◆ IsRestrictedFromAdvancedPlacing()

bool Hologram::IsRestrictedFromAdvancedPlacing ( )
inlineprivate

Definition at line 1496 of file Hologram.c.

1497 {
1498 if (m_Player.IsJumpInProgress())
1499 return true;
1500 if (m_Player.IsSwimming())
1501 return true;
1502 if (m_Player.IsClimbingLadder())
1503 return true;
1504 if (m_Player.IsRaised())
1505 return true;
1506 if (m_Player.IsClimbing())
1507 return true;
1508 if (m_Player.IsRestrained())
1509 return true;
1510 if (m_Player.IsUnconscious())
1511 return true;
1512
1513 return false;
1514 }

References m_Player.

Referenced by UpdateHologram().

◆ IsSurfaceSea()

bool Hologram::IsSurfaceSea ( vector position)
inlineprotected

Definition at line 1031 of file Hologram.c.

1032 {
1033 CGame game = GetGame();
1034 return game.SurfaceIsSea(position[0], position[2]);
1035 }

References GetGame().

Referenced by IsUnderwater().

◆ IsSurfaceWater()

bool Hologram::IsSurfaceWater ( vector position)
inlineprotected

Definition at line 1025 of file Hologram.c.

1026 {
1027 CGame game = GetGame();
1028 return game.SurfaceIsSea(position[0], position[2]) || game.SurfaceIsPond(position[0], position[2]);
1029 }

References GetGame().

◆ IsUnderwater()

bool Hologram::IsUnderwater ( )
inlineprotected

Definition at line 800 of file Hologram.c.

801 {
803 return false;
804 // Fast check middle of object
805 string type;
806 int liquid;
807 g_Game.SurfaceUnderObject(m_Projection, type, liquid);
808
809 if (liquid == LIQUID_WATER)
810 {
811#ifdef DIAG_DEVELOPER
812 DebugText("IsUnderwater: ", false, true, " | Surface under object is water");
813#endif
814 return true;
815 }
816
817 // Check every corner of the object
823
824#ifdef DIAG_DEVELOPER
825 // I'd rather duplicate this on internal than introduce (even) more raycasts than needed on retail..
826 float lc = g_Game.GetWaterDepth(left_close);
827 float rc = g_Game.GetWaterDepth(right_close);
828 float lf = g_Game.GetWaterDepth(left_far);
829 float rf = g_Game.GetWaterDepth(right_far);
830 bool isTrue = (lc > 0 || rc > 0 || lf > 0 || rf > 0 || surface_sea_water);
831 DebugText("IsUnderwater: ", false, isTrue, " surface_sea_water: " + surface_sea_water + " | (all must be less than zero) | lc: " + lc + " | rc: " + rc + " | lf: " + lf + " | rf: " + rf);
832 //DebugText("Corner Height: ", false, true, " lc: " + left_close[1] + " | rc: " + right_close[1] + " | lf: " + left_far[1] + " | rf: " + right_far[1]);
833 if (isTrue)
834 {
835 array<bool> conditions = {lc <= 0, rc <= 0, lf <= 0, rf <= 0};
837 }
838#endif
839
840 return (surface_sea_water || g_Game.GetWaterDepth(left_close) > 0 || g_Game.GetWaterDepth(right_close) > 0 || g_Game.GetWaterDepth(left_far) > 0 || g_Game.GetWaterDepth(right_far) > 0);
841 }
static bool GetDisableIsUnderwaterCheck()
bool IsSurfaceSea(vector position)
Definition Hologram.c:1031
const int LIQUID_WATER
Definition constants.c:504

References g_Game, CfgGameplayHandler::GetDisableIsUnderwaterCheck(), GetLeftCloseProjectionVector(), GetLeftFarProjectionVector(), GetRightCloseProjectionVector(), GetRightFarProjectionVector(), IsSurfaceSea(), LIQUID_WATER, and m_Projection.

Referenced by EvaluateCollision().

◆ PlaceEntity()

EntityAI Hologram::PlaceEntity ( EntityAI entity_for_placing)
inlineprotected

Definition at line 947 of file Hologram.c.

948 {
949 //string-based comparison
950 if (entity_for_placing.IsInherited(TentBase) || entity_for_placing.IsBasebuildingKit())
951 return entity_for_placing;
952
953 if (m_Projection.IsInherited(GardenPlotPlacing))
954 {
955 Class.CastTo(entity_for_placing, GetGame().CreateObjectEx("GardenPlot", m_Projection.GetPosition(), ECE_OBJECT_SWAP));
956 return entity_for_placing;
957 }
958
959 //inheritance comparison
960 if (!GetProjectionEntity().IsKindOf(m_Parent.GetType()))
961 Class.CastTo(entity_for_placing, GetGame().CreateObjectEx(m_Projection.GetType(), m_Projection.GetPosition(), ECE_OBJECT_SWAP));
962
963 return entity_for_placing;
964 }
const int ECE_OBJECT_SWAP

References Class::CastTo(), ECE_OBJECT_SWAP, GetGame(), GetProjectionEntity(), m_Parent, and m_Projection.

◆ ProjectionBasedOnParent()

string Hologram::ProjectionBasedOnParent ( )
inlineprotected

Definition at line 198 of file Hologram.c.

199 {
201 }
string GetProjectionName(ItemBase item)
Definition Hologram.c:203

References GetProjectionName(), and m_Parent.

Referenced by Hologram().

◆ RefreshTrigger()

void Hologram::RefreshTrigger ( )
inlineprotected

◆ RefreshVisual()

void Hologram::RefreshVisual ( )
inlineprotected

Definition at line 1446 of file Hologram.c.

1447 {
1448 if (m_Projection)
1449 {
1450 static const string textureName = "#(argb,8,8,3)color(0.5,0.5,0.5,0.75,ca)";
1451
1452 int hidden_selection = 0;
1453 string selection_to_refresh;
1454 string config_material = string.Format("CfgVehicles %1 hologramMaterial", m_Projection.GetType());
1455 string hologram_material = GetGame().ConfigGetTextOut(config_material);
1456 string config_model = string.Format("CfgVehicles %1 hologramMaterialPath", m_Projection.GetType());
1457 string hologram_material_path = string.Format("%1\\%2%3", GetGame().ConfigGetTextOut(config_model), hologram_material, CorrectMaterialPathName());
1458
1459 for (int i = 0; i < m_SelectionsToRefresh.Count(); ++i)
1460 {
1463 m_Projection.SetObjectTexture(hidden_selection, textureName);
1465 }
1466 }
1467 }
string CorrectMaterialPathName()
Definition Hologram.c:1470
ref set< string > m_SelectionsToRefresh
Definition Hologram.c:56
int GetHiddenSelection(string selection)
Definition Hologram.c:1423

References CorrectMaterialPathName(), GetGame(), GetHiddenSelection(), m_Projection, and m_SelectionsToRefresh.

Referenced by CreateTrigger(), and UpdateHologram().

◆ SetAnimations()

void Hologram::SetAnimations ( )
inlineprotected

Definition at line 161 of file Hologram.c.

162 {
163 if (m_Projection.HasAnimation(ANIMATION_PLACING))
164 {
165 m_Projection.SetAnimationPhase(ANIMATION_PLACING, 0);
167
168 if (m_Projection.HasAnimation(ANIMATION_INVENTORY))
169 m_Projection.SetAnimationPhase(ANIMATION_INVENTORY, 1);
170 }
171 else
172 {
175 }
176 }
const string ANIMATION_PLACING
Definition Hologram.c:37
const string SELECTION_PLACING
Definition Hologram.c:39
void SetSelectionToRefresh(string selection)
Definition Hologram.c:1434
void UpdateSelections()
Definition Hologram.c:179
const string SELECTION_INVENTORY
Definition Hologram.c:40
const string ANIMATION_INVENTORY
Definition Hologram.c:38

References ANIMATION_INVENTORY, ANIMATION_PLACING, m_Projection, SELECTION_INVENTORY, SELECTION_PLACING, SetSelectionToRefresh(), and UpdateSelections().

Referenced by Hologram().

◆ SetHologramPosition()

bool Hologram::SetHologramPosition ( vector startPosition,
float minProjectionDistance,
float maxProjectionDistance,
inout vector contactPosition )
inlineprotected

Sets hologram position based on player and projection distance.

Parameters
startPositionstart position
minProjectionDistancelower distance limit
maxProjectionDistancehigher distance limit
inoutcontactPosition is position of the hologram contact with ground/object
Returns
true if hologram is floating (is on the near or far edge)

Definition at line 1122 of file Hologram.c.

1123 {
1126
1127#ifdef DIAG_DEVELOPER
1128 DebugText("SetHologramPosition::startPosition: ", false, m_IsHidden, string.Format(" | %1", startPosition));
1129 DebugText("SetHologramPosition::contactPosition [in]: ", false, m_IsHidden, string.Format(" | %1", contactPosition));
1130 DebugText("SetHologramPosition::minProjectionDistance: ", false, m_IsHidden, string.Format(" | %1", minProjectionDistance));
1131 DebugText("SetHologramPosition::maxProjectionDistance: ", false, m_IsHidden, string.Format(" | %1", maxProjectionDistance));
1132 DebugText("SetHologramPosition::playerToProjectionDistance: ", false, m_IsHidden, string.Format(" | %1", playerToProjectionDistance));
1133#endif
1134
1135 //hologram is at min distance from player
1137 {
1139 playerToProjection.Normalize();
1140 //prevents the hologram to go underground/floor while hologram exceeds minProjectionDistance
1142
1144
1145#ifdef DIAG_DEVELOPER
1146 DebugText("SetHologramPosition::contactPosition[out] (< minProjectDistance): ", false, m_IsHidden, string.Format(" | %1", contactPosition));
1147#endif
1148
1149 return true;
1150 }
1151 //hologram is at max distance from player
1153 {
1155 playerToProjection.Normalize();
1156 //prevents the hologram to go underground/floor while hologram exceeds maxProjectionDistance
1158
1160
1161#ifdef DIAG_DEVELOPER
1162 DebugText("SetHologramPosition::contactPosition[out] (< maxProjectionDistance): ", false, m_IsHidden, string.Format(" | %1", contactPosition));
1163#endif
1164
1165 return true;
1166 }
1167
1168 return false;
1169 }
const float PROJECTION_TRANSITION_MAX
Definition Hologram.c:47
const float PROJECTION_TRANSITION_MIN
Definition Hologram.c:46

References vector::Distance(), m_IsHidden, PROJECTION_TRANSITION_MAX, and PROJECTION_TRANSITION_MIN.

Referenced by GetProjectionEntityPosition().

◆ SetIsColliding()

void Hologram::SetIsColliding ( bool is_colliding)
inlineprotected

Definition at line 1250 of file Hologram.c.

1251 {
1252#ifdef DIAG_DEVELOPER
1253 DebugText("Is colliding: ", false, is_colliding, m_CollisionDetails);
1254#endif
1256 }

References m_IsColliding.

Referenced by EvaluateCollision().

◆ SetIsCollidingGPlot()

void Hologram::SetIsCollidingGPlot ( bool is_colliding_gplot)
inlineprotected

Definition at line 1268 of file Hologram.c.

1269 {
1271 }

References m_IsCollidingGPlot.

◆ SetIsCollidingPlayer()

void Hologram::SetIsCollidingPlayer ( bool is_colliding)
inlineprotected

Definition at line 1263 of file Hologram.c.

1264 {
1266 }

References m_IsCollidingPlayer.

◆ SetIsFloating()

void Hologram::SetIsFloating ( bool is_floating)
inlineprotected

Definition at line 1245 of file Hologram.c.

1246 {
1248 }

References m_IsFloating.

Referenced by GetProjectionEntityPosition().

◆ SetIsHidden()

void Hologram::SetIsHidden ( bool is_hidden)
inlineprotected

Definition at line 1258 of file Hologram.c.

1259 {
1261 }

References m_IsHidden.

◆ SetOnGround()

vector Hologram::SetOnGround ( vector position)
inlineprotected

Definition at line 1332 of file Hologram.c.

1333 {
1335 vector ground;
1338
1340
1341 vector to = from + ground;
1343
1345 rayInput.flags = CollisionFlags.ALLOBJECTS;
1347
1349 {
1351 for (int i = 0; i < results.Count(); i++)
1352 {
1353 res = results.Get(i);
1354 if (res.entry || (!res.obj && !res.parent))
1355 {
1356 contact_pos = res.pos;
1357 break;
1358 }
1359 }
1360 }
1361
1362 //LOS check
1363 if (contact_pos != "0 0 0")
1364 {
1367 int check_component = -1;
1369 to = contact_pos;
1370 to[1] = to[1] + 0.1;
1372
1374 {
1375 if ((hit_object.Count() > 0) && (!hit_object[0].IsInherited(Watchtower) || (hit_object[0].IsInherited(Watchtower) && (m_WatchtowerIgnoreComponentNames.Find(hit_object[0].GetActionComponentName(check_component, LOD.NAME_VIEW)) == -1))))
1376 contact_pos = "0 0 0";
1377 }
1378 }
1379
1381
1382 return contact_pos;
1383 }
static proto bool RaycastRVProxy(notnull RaycastRVParams in, out notnull array< ref RaycastRVResult > results, array< Object > excluded=null)
vector HideWhenClose(vector pos)
Definition Hologram.c:1385
const float SMALL_PROJECTION_GROUND
Definition Hologram.c:43
float GetProjectionDiameter()
Definition Hologram.c:1191
CollisionFlags
Definition EnDebug.c:141
static proto float Max(float x, float y)
Returns bigger of two given values.

References GetProjectionDiameter(), HideWhenClose(), m_FromAdjusted, m_Player, m_Projection, m_WatchtowerIgnoreComponentNames, Math::Max(), LOD::NAME_VIEW, DayZPhysics::RaycastRV(), DayZPhysics::RaycastRVProxy(), SMALL_PROJECTION_GROUND, and Vector().

Referenced by SetProjectionPosition().

◆ SetProjectionEntity()

void Hologram::SetProjectionEntity ( EntityAI projection)
inlineprotected

Definition at line 1235 of file Hologram.c.

1236 {
1238 }

References m_Projection.

Referenced by Hologram().

◆ SetProjectionOrientation()

void Hologram::SetProjectionOrientation ( vector orientation)
inlineprotected

Definition at line 1312 of file Hologram.c.

1313 {
1314 m_Projection.SetOrientation(orientation);
1315 }

References m_Projection.

Referenced by UpdateHologram().

◆ SetProjectionPosition()

void Hologram::SetProjectionPosition ( vector position)
inlineprotected

Definition at line 1304 of file Hologram.c.

1305 {
1306 m_Projection.SetPosition(position);
1307
1308 if (IsFloating())
1309 m_Projection.SetPosition(SetOnGround(position));
1310 }
vector SetOnGround(vector position)
Definition Hologram.c:1332

References IsFloating(), m_Projection, and SetOnGround().

Referenced by UpdateHologram().

◆ SetSelectionToRefresh() [1/2]

void Hologram::SetSelectionToRefresh ( array< string > selection)
inlineprotected

Definition at line 1440 of file Hologram.c.

1441 {
1442 foreach (string s : selection)
1443 m_SelectionsToRefresh.Insert(s);
1444 }

References m_SelectionsToRefresh.

◆ SetSelectionToRefresh() [2/2]

void Hologram::SetSelectionToRefresh ( string selection)
inlineprotected

Definition at line 1434 of file Hologram.c.

1435 {
1436 m_SelectionsToRefresh.Insert(selection);
1437 }

References m_SelectionsToRefresh.

Referenced by SetAnimations().

◆ SetUpdatePosition()

void Hologram::SetUpdatePosition ( bool state)
inlineprotected

Definition at line 1220 of file Hologram.c.

1221 {
1223 }

References m_UpdatePosition.

◆ SmoothProjectionMovement()

vector Hologram::SmoothProjectionMovement ( vector y_p_r,
float timeslice )
inlineprotected

Definition at line 313 of file Hologram.c.

314 {
316 {
317 if (Math.AbsFloat(y_p_r[0] - m_y_p_r_previous[0]) > 100)
318 {
319 if (y_p_r[0] > 0)
321
322 if (y_p_r[0] < 0)
324 }
325
326 y_p_r[0] = Math.Lerp(m_y_p_r_previous[0], y_p_r[0], 15 * timeslice);
327 y_p_r[1] = Math.Lerp(m_y_p_r_previous[1], y_p_r[1], 15 * timeslice);
328 y_p_r[2] = Math.Lerp(m_y_p_r_previous[2], y_p_r[2], 15 * timeslice);
329 }
330
332
333 return y_p_r;
334 }
vector m_y_p_r_previous
Definition Hologram.c:34
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.

References Math::AbsFloat(), Math::Lerp(), and m_y_p_r_previous.

Referenced by AlignProjectionOnTerrain().

◆ SubtractProjectionRotation()

void Hologram::SubtractProjectionRotation ( float subtraction)
inlineprotected

Definition at line 1327 of file Hologram.c.

1328 {
1330 }

References m_Rotation.

◆ UpdateHologram()

void Hologram::UpdateHologram ( float timeslice)
inlineprotected

Definition at line 229 of file Hologram.c.

230 {
231 if (!m_Parent)
232 {
233 m_Player.TogglePlacingLocal();
234
235 return;
236 }
237
239 {
240 m_Player.TogglePlacingLocal();
241
242 return;
243 }
244
245 if (!GetUpdatePosition())
246 return;
247
248
249#ifdef DIAG_DEVELOPER
252#endif
253
254 // update hologram position
257
262
263 m_Projection.OnHologramBeingPlaced(m_Player);
264 }
bool GetUpdatePosition()
Definition Hologram.c:1225
void EvaluateCollision(ItemBase action_item=null)
Definition Hologram.c:393
void CheckPowerSource()
Definition Hologram.c:930
void SetProjectionOrientation(vector orientation)
Definition Hologram.c:1312
vector AlignProjectionOnTerrain(float timeslice)
Definition Hologram.c:266
vector GetProjectionEntityPosition(PlayerBase player)
Definition Hologram.c:1037
void SetProjectionPosition(vector position)
Definition Hologram.c:1304
bool IsRestrictedFromAdvancedPlacing()
Definition Hologram.c:1496

References AlignProjectionOnTerrain(), CheckPowerSource(), DestroyDebugCollisionBox(), EvaluateCollision(), GetProjectionEntityPosition(), GetUpdatePosition(), IsRestrictedFromAdvancedPlacing(), m_Parent, m_Player, m_Projection, RefreshTrigger(), RefreshVisual(), SetProjectionOrientation(), and SetProjectionPosition().

◆ UpdateSelections()

void Hologram::UpdateSelections ( )
inlineprotected

Definition at line 179 of file Hologram.c.

180 {
181 string cfg_access = "CfgVehicles " + m_Projection.GetType() + " AnimationSources ";
182
183 if (GetGame().ConfigIsExisting(cfg_access))
184 {
185 int cfg_access_count = g_Game.ConfigGetChildrenCount(cfg_access);
186
187 for (int i = 0; i < cfg_access_count; ++i)
188 {
189 string found_anim;
190 GetGame().ConfigGetChildName(cfg_access, i, found_anim);
191
192 float anim_phase = m_Parent.GetAnimationPhase(found_anim);
193 m_Projection.SetAnimationPhase(found_anim, anim_phase);
194 }
195 }
196 }

References g_Game, GetGame(), m_Parent, and m_Projection.

Referenced by SetAnimations().

Member Data Documentation

◆ ANIMATION_INVENTORY

const string Hologram::ANIMATION_INVENTORY = "Inventory"
protected

Definition at line 38 of file Hologram.c.

Referenced by SetAnimations().

◆ ANIMATION_PLACING

const string Hologram::ANIMATION_PLACING = "Placing"
protected

Definition at line 37 of file Hologram.c.

Referenced by SetAnimations().

◆ DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF

const float Hologram::DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF = 1.5
staticprotected

Definition at line 49 of file Hologram.c.

Referenced by HeightPlacementCheck().

◆ DISTANCE_SMALL_PROJECTION

const float Hologram::DISTANCE_SMALL_PROJECTION = 1
protected

Definition at line 44 of file Hologram.c.

◆ LARGE_PROJECTION_DISTANCE_LIMIT

const float Hologram::LARGE_PROJECTION_DISTANCE_LIMIT = 6
protected

Deprecated.

Definition at line 45 of file Hologram.c.

Referenced by GetProjectionEntityPosition().

◆ LOOKING_TO_SKY

const float Hologram::LOOKING_TO_SKY = 0.75
protected

Definition at line 48 of file Hologram.c.

Referenced by HideWhenClose().

◆ m_AlignToTerrain

bool Hologram::m_AlignToTerrain
protected

Definition at line 52 of file Hologram.c.

Referenced by AlignProjectionOnTerrain(), and Hologram().

◆ m_ContactComponent

int Hologram::m_ContactComponent
protected

Definition at line 54 of file Hologram.c.

Referenced by GetProjectionEntityPosition(), Hologram(), and IsObjectStatic().

◆ m_ContactDir

vector Hologram::m_ContactDir
protected

Definition at line 35 of file Hologram.c.

Referenced by AlignProjectionOnTerrain(), and GetProjectionEntityPosition().

◆ m_DefaultOrientation

vector Hologram::m_DefaultOrientation
protected

Definition at line 32 of file Hologram.c.

Referenced by GetDefaultOrientation().

◆ m_FromAdjusted

vector Hologram::m_FromAdjusted
protected

Definition at line 36 of file Hologram.c.

Referenced by GetProjectionEntityPosition(), Hologram(), and SetOnGround().

◆ m_IsColliding

bool Hologram::m_IsColliding
protected

Definition at line 24 of file Hologram.c.

Referenced by IsColliding(), and SetIsColliding().

◆ m_IsCollidingGPlot

bool Hologram::m_IsCollidingGPlot
protected

Definition at line 25 of file Hologram.c.

Referenced by IsCollidingGPlot(), and SetIsCollidingGPlot().

◆ m_IsCollidingPlayer

bool Hologram::m_IsCollidingPlayer
protected

Definition at line 27 of file Hologram.c.

Referenced by IsCollidingPlayer(), and SetIsCollidingPlayer().

◆ m_IsFloating

bool Hologram::m_IsFloating
protected

Definition at line 28 of file Hologram.c.

Referenced by IsFloating(), and SetIsFloating().

◆ m_IsHidden

bool Hologram::m_IsHidden
protected

Definition at line 30 of file Hologram.c.

Referenced by IsHidden(), SetHologramPosition(), and SetIsHidden().

◆ m_IsSlope

bool Hologram::m_IsSlope
protected

Definition at line 26 of file Hologram.c.

◆ m_Parent

◆ m_Player

◆ m_Projection

◆ m_ProjectionTrigger

ProjectionTrigger Hologram::m_ProjectionTrigger
protected

Definition at line 21 of file Hologram.c.

Referenced by CreateTrigger(), Hologram(), RefreshTrigger(), and ~Hologram().

◆ m_ProjectionTypename

string Hologram::m_ProjectionTypename
protected

Definition at line 22 of file Hologram.c.

Referenced by GetProjectionName(), and Hologram().

◆ m_Rotation

vector Hologram::m_Rotation
protected

◆ m_SelectionsToRefresh

ref set<string> Hologram::m_SelectionsToRefresh = new set<string>
protected

Definition at line 56 of file Hologram.c.

Referenced by RefreshVisual(), SetSelectionToRefresh(), and SetSelectionToRefresh().

◆ m_SlopeTolerance

float Hologram::m_SlopeTolerance
protected

Definition at line 51 of file Hologram.c.

Referenced by Hologram(), and IsBaseFlat().

◆ m_UpdatePosition

bool Hologram::m_UpdatePosition
protected

Definition at line 29 of file Hologram.c.

Referenced by GetUpdatePosition(), Hologram(), and SetUpdatePosition().

◆ m_WatchtowerBlockedComponentNames

ref array<string> Hologram::m_WatchtowerBlockedComponentNames = new array<string>
staticprotected

Definition at line 63 of file Hologram.c.

Referenced by Hologram(), and IsObjectStatic().

◆ m_WatchtowerIgnoreComponentNames

ref array<string> Hologram::m_WatchtowerIgnoreComponentNames = new array<string>
staticprotected

Definition at line 60 of file Hologram.c.

Referenced by CorrectForWatchtower(), Hologram(), and SetOnGround().

◆ m_y_p_r_previous

vector Hologram::m_y_p_r_previous
protected

Definition at line 34 of file Hologram.c.

Referenced by SmoothProjectionMovement().

◆ m_YawPitchRollLimit

vector Hologram::m_YawPitchRollLimit
protected

Definition at line 53 of file Hologram.c.

Referenced by Hologram(), and IsCollidingAngle().

◆ PROJECTION_TRANSITION_MAX

const float Hologram::PROJECTION_TRANSITION_MAX = 0.25
protected

Definition at line 47 of file Hologram.c.

Referenced by SetHologramPosition().

◆ PROJECTION_TRANSITION_MIN

const float Hologram::PROJECTION_TRANSITION_MIN = 1
protected

Definition at line 46 of file Hologram.c.

Referenced by SetHologramPosition().

◆ SELECTION_INVENTORY

const string Hologram::SELECTION_INVENTORY = "inventory"
protected

Definition at line 40 of file Hologram.c.

Referenced by SetAnimations().

◆ SELECTION_PLACING

const string Hologram::SELECTION_PLACING = "placing"
protected

Definition at line 39 of file Hologram.c.

Referenced by SetAnimations().

◆ SMALL_PROJECTION_GROUND

const float Hologram::SMALL_PROJECTION_GROUND = 2
protected

Definition at line 43 of file Hologram.c.

Referenced by SetOnGround().

◆ SMALL_PROJECTION_RADIUS

const float Hologram::SMALL_PROJECTION_RADIUS = 1
protected

Definition at line 42 of file Hologram.c.

Referenced by GetProjectionEntityPosition().

◆ SPAWN_FLAGS

const int Hologram::SPAWN_FLAGS = ECE_LOCAL
protected

Definition at line 6 of file Hologram.c.

Referenced by CreateTrigger().

◆ SUFFIX_MATERIAL_DEPLOYABLE

const string Hologram::SUFFIX_MATERIAL_DEPLOYABLE = "_deployable.rvmat"
protected

Definition at line 14 of file Hologram.c.

Referenced by CorrectMaterialPathName().

◆ SUFFIX_MATERIAL_POWERED

const string Hologram::SUFFIX_MATERIAL_POWERED = "_powered.rvmat"
protected

Definition at line 16 of file Hologram.c.

Referenced by CorrectMaterialPathName().

◆ SUFFIX_MATERIAL_UNDEPLOYABLE

const string Hologram::SUFFIX_MATERIAL_UNDEPLOYABLE = "_undeployable.rvmat"
protected

Definition at line 15 of file Hologram.c.

Referenced by CorrectMaterialPathName().


The documentation for this class was generated from the following file: