514 {
515 if ( selection != "")
516 {
518 }
519 vector player_pos = player.GetPosition();
521 vector ref_dir = GetDirection();
522 ref_dir[1] = 0;
524
525 vector min,max;
526
527 min = -GetMemoryPointPos( "interact_min" );
528 max = -GetMemoryPointPos( "interact_max" );
529
530 vector dir_to_tower = tower_pos - player_pos;
531 dir_to_tower[1] = 0;
532 float len = dir_to_tower.
Length();
533
534
536
539 vector test_angles = dir_to_tower_angle - ref_dir_angle;
540
542
543 if (test_position[0] > max[0] || test_position[0] < min[0] || test_position[2] > max[2] || test_position[2] < min[2] )
544 {
545 return false;
546 }
547
548 return true;
549 }
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.
vector GetPosition()
Get the world position of the Effect.