1851 {
1852 vector closest_pos = to_pos;
1853 float smallest_dist = float.MAX;
1855 {
1857 vpos[0] = pos[0];
1858 vpos[2] = pos[1];
1859
1860 to_pos[1] = 0;
1862 if ( dist < smallest_dist)
1863 {
1864 smallest_dist = dist;
1865 closest_pos = vpos;
1866 }
1867 }
1868 return closest_pos;
1869 }
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.