DEPRECATED.
605 {
606 Object cursorTarget = null;
608
609
611 vector cameraDirection =
g_Game.GetCurrentCameraDirection();
612
613 MiscGameplayFunctions.GetHeadBonePos(player, pos);
617
618
619 set<Object> hitObjects = new set<Object>;
620 int hitComponentIndex;
622 vector start, end, hitNormal, hitPosObstructed;
624
625 if ( !
DayZPhysics.
RaycastRV(
m_RayStart,
m_RayEndShort,
m_HitPositionWS, hitNormal,
m_HitZoneIdx, hitObjects, null, player,
false,
false, ObjIntersectIFire) && !
DayZPhysics.
RaycastRV(
m_RayStart,
m_RayEnd,
m_HitPositionWS, hitNormal,
m_HitZoneIdx, hitObjects, null, player,
false,
false, ObjIntersectIFire,
TARGETING_RAY_RADIUS) )
626 {
628
629 }
630 else if ( hitObjects.Count() > 0 )
631 {
632 cursorTarget = hitObjects.Get(0);
633
638 playerPos[1] = 0;
639 hitPos[1] = 0;
640
643 {
646 {
648 }
649 }
650
652 {
654
655 }
656 else
657 {
660 }
661 }
662 else
663 {
665
666 }
667 }
float GetWeaponRange(InventoryItem weapon, int weaponMode)
vector m_RayEndShort
DEPRECATED: "HitZoneSelection".
const float TARGETING_RAY_DIST_SHORT
DEPRECATED: "HitZoneSelection".
const float TARGETING_RAY_DIST
DEPRECATED: "HitZoneSelection".
DayZPlayerImplement m_DZPlayer
Parent.
ref array< typename > m_NonAlignableObjects
Typenames of objects that can be targeted, but are not a priority (3rd Pass)
vector m_RayStart
Start position of most recent HitZoneSelectionRaycast.
Object m_TargetObject
Targets - types.
vector m_HitPositionWS
Most recent target position.
const string DEFAULT_HIT_ZONE
DEPRECATED: "HitZoneSelection".
int m_HitZoneIdx
Hit result - cache.
string m_HitZoneName
Most recent target HitZone name.
InventoryItem m_Weapon
Weapons - cache.
vector m_RayEnd
End position of most recent HitZoneSelectionRaycast.
const float TARGETING_RAY_RADIUS
DEPRECATED: "HitZoneSelection".
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.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.