81 {
83
84 if ( player )
85 {
88 vector contact_pos;
89 vector contact_dir;
90 int contactComponent;
91
92 DayZPhysics.RaycastRV( from, to, contact_pos, contact_dir, contactComponent, NULL , NULL, player, false, false, ObjIntersectIFire);
93
94
95 float dist = vector.
Distance( from, contact_pos );
96 dist = Math.Round(dist);
97
99 {
100 if( dist < 10 )
102 else if( dist < 100 )
104 else
106 }
107 else
108 {
110 }
111 }
112 }
proto native vector GetCurrentCameraPosition()
proto native vector GetCurrentCameraDirection()
static const float RANGEFINDER_MAX_DISTANCE
proto string ToString(bool simple=true)
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto native CGame GetGame()