Gets the nearest door based on the sound position (quick and dirty function for debugging)
См. определение в файле Building.c строка 66
67 {
68 float smallestDist = float.MAX;
69 int nearestDoor = -1;
70
72 for (int i = 0; i < count; i++)
73 {
75 if (dist < smallestDist)
76 {
77 nearestDoor = i;
78 smallestDist = dist;
79 }
80 }
81
82 return nearestDoor;
83 }
proto native int GetDoorCount()
Returns the number of the doors in the building.
proto native vector GetDoorSoundPos(int index)
Position in world space for where the door sounds are played from.
Перекрестные ссылки vector::DistanceSq(), GetDoorCount() и GetDoorSoundPos().
Используется в OnAction().