101 if (entity.IsParticle())
103 if (entity.IsScriptedLight())
105 if (entity.IsBeingPlaced())
107 if (entity.IsHologram())
109 if (entity.
IsMan() || entity.IsZombie() || entity.IsZombieMilitary())
112 vector entityPosition = entity.GetPosition();
114 if (entity && entity.
IsMan())
119 entityPosition = vicinityPlayer.GetBonePositionWS(vicinityPlayer.GetBoneIndexByName(
"spine3"));
122 else if (entity && (entity.IsZombie() || entity.IsZombieMilitary()))
127 entityPosition = zombie.GetBonePositionWS(zombie.GetBoneIndexByName(
"spine3"));
132 if (FreeDebugCamera.GetInstance() && FreeDebugCamera.GetInstance().IsActive())
137 vector entityDirection = player.GetPosition() - entityPosition;
139 entityDirection[1] = 0;
141 vector playerDirection = MiscGameplayFunctions.GetHeadingVector(player);
143 playerDirection[1] = 0;
145 float dotRadians =
vector.
Dot(playerDirection, entityDirection);
146 if (dotRadians > -0.5)
217 vector playerPosition = player.GetPosition();
218 vector playerHeadPositionFixed = playerPosition;
220 vector headingDirection = MiscGameplayFunctions.GetHeadingVector(player);
223 bool cameraActive = FreeDebugCamera.GetInstance() && FreeDebugCamera.GetInstance().IsActive();
226 playerPosition = FreeDebugCamera.GetInstance().GetPosition();
227 playerHeadPositionFixed = playerPosition;
229 float headingAngle = FreeDebugCamera.GetInstance().GetOrientation()[0] *
Math.
DEG2RAD;
231 headingDirection[0] =
Math.
Cos(headingAngle);
232 headingDirection[1] = 0;
233 headingDirection[2] =
Math.
Sin(headingAngle);
248 foreach (
CargoBase cargoObject : proxyCargos)
252 foreach (
Object actorInRadius : objectsInVicinity)
255 allFoundObjects.Insert(actorInRadius);
261 filteredObjects.Insert(actorInRadius);
264 if (objectsInVicinity)
265 objectsInVicinity.Clear();
272 foreach (
Object objectInRadius : objectsInVicinity)
275 allFoundObjects.Insert(objectInRadius);
281 filteredObjects.Insert(objectInRadius);
284 if (objectsInVicinity)
285 objectsInVicinity.Clear();
294 foreach (
Object objectInCone : objectsInVicinity)
297 allFoundObjects.Insert(objectInCone);
304 rayInput =
new RaycastRVParams(playerHeadPositionFixed, objectInCone.GetPosition());
306 rayInput.
type = ObjIntersectView;
316 if (result.hierLevel > 0)
318 if (result.parent.CanProxyObstruct())
321 if (result.parent == objectInCone)
323 filteredObjects.Insert(objectInCone);
329 if (result.obj == objectInCone)
331 filteredObjects.Insert(objectInCone);
347 params.
SetParams(playerPosition, headingDirection.
VectorToAngles(), boxEdgeLength * 2, ObjIntersect.View, ObjIntersect.Fire,
true);
349 if (
GetGame().IsBoxCollidingGeometryProxy(params, {player}, results))
351 foreach (BoxCollidingResult bResult : results)
353 if (bResult.obj && (bResult.obj.CanObstruct() || bResult.obj.CanProxyObstruct()))
356 allFoundObjects.Insert(bResult.obj);
359 if (bResult.parent && (bResult.parent.CanObstruct() || bResult.parent.CanProxyObstruct()))
362 allFoundObjects.Insert(bResult.parent);
369 MiscGameplayFunctions.FilterObstructingObjects(allFoundObjects, obstructingObjects);
372 if (obstructingObjects.Count() > 0 && !cameraActive)
375 if (filteredObjects.Count() > 10)
380 foreach (
Object object: filteredObjectsGrouped)
385 foreach (
Object filteredObjectClose: filteredObjects)
408 foreach (
Object filteredObject: filteredObjects)