509 {
510 if ( selection != "")
511 {
513 }
514 vector player_pos = player.GetPosition();
516 vector ref_dir = GetDirection();
517 ref_dir[1] = 0;
519
520 vector min,max;
521
522 min = -GetMemoryPointPos( "interact_min" );
523 max = -GetMemoryPointPos( "interact_max" );
524
525 vector dir_to_tower = tower_pos - player_pos;
526 dir_to_tower[1] = 0;
527 float len = dir_to_tower.
Length();
528
529
531
534 vector test_angles = dir_to_tower_angle - ref_dir_angle;
535
537
538 if (test_position[0] > max[0] || test_position[0] < min[0] || test_position[2] > max[2] || test_position[2] < min[2] )
539 {
540 return false;
541 }
542
543 return true;
544 }
override bool CheckLevelVerticalDistance(float max_dist, string selection, PlayerBase player)
const float MAX_FLOOR_VERTICAL_DISTANCE
proto native float Length()
Returns length of vector (magnitude)
proto float Normalize()
Normalizes vector. Returns length.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
proto vector AnglesToVector()
Converts spherical coordinates (yaw, pitch, roll in degrees) to unit length vector.
class JsonUndergroundAreaTriggerData GetPosition