479 {
480 vector ref_pos;
481 vector ref_dir;
483
484 if ( MemoryPointExists( selection ) )
485 {
486 ref_pos = ModelToWorld( GetMemoryPointPos( selection ) );
488
490 ref_dir[1] = 0;
491
492 cam_dir[1] = 0;
493
494 if ( ref_dir.
Length() > 0.5 )
495 {
496 float dot = vector.Dot( cam_dir, ref_dir );
497
498 if ( dot < 0 )
499 {
500 return true;
501 }
502 }
503 }
504
505 return false;
506 }
proto native vector GetCurrentCameraDirection()
proto native float Length()
Returns length of vector (magnitude)
proto float Normalize()
Normalizes vector. Returns length.
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition