DEPRECATED.
603 {
604 Object cursorTarget = null;
606
607
610
611 MiscGameplayFunctions.GetHeadBonePos(player, pos);
615
616
617 set<Object> hitObjects = new set<Object>;
618 int hitComponentIndex;
619 float hitFraction;
620 vector start, end, hitNormal, hitPosObstructed;
622
623 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) )
624 {
626
627 }
628 else if ( hitObjects.Count() > 0 )
629 {
630 cursorTarget = hitObjects.Get(0);
631
636 playerPos[1] = 0;
637 hitPos[1] = 0;
638
641 {
644 {
646 }
647 }
648
650 {
652
653 }
654 else
655 {
658 }
659 }
660 else
661 {
663
664 }
665 }
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".
proto native vector GetCurrentCameraDirection()
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.
proto native CGame GetGame()