390 {
391 vector from, to;
392 if (allowFreeflight && FreeDebugCamera.GetInstance().IsActive())
393 {
394 from = FreeDebugCamera.GetInstance().GetPosition();
395 to = from + FreeDebugCamera.GetInstance().GetDirection() * maxDist;
396 }
397 else
398 {
401 }
402
403 float hitFraction;
404 vector start, end;
405 vector direction;
406
407 vector hitPos, hitNormal;
409
411 DayZPhysics.RayCastBullet(from, to, hitMask, player, obj, hitPos, hitNormal, hitFraction);
412
413
414 if (hitPos != vector.Zero)
415 {
417 }
418 }
proto native vector GetCurrentCameraPosition()
proto native vector GetCurrentCameraDirection()
EntityAI SpawnEntityOnGroundPos(PlayerBase player, string item_name, float health, float quantity, vector pos, bool special=false, bool withPhysics=false)
spawns entity on exact position
proto native CGame GetGame()