DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ PlayerInsideOfLocationFilter() [1/2]

bool DynamicMusicPlayer::PlayerInsideOfLocationFilter ( array< ref DynamicMusicTrackData > locations)
inlineprivate

См. определение в файле DynamicMusicPlayer.c строка 527

528 {
530
531 if (locations.Count() > 0)
532 {
533 foreach (DynamicMusicTrackData track : locations)
534 {
535 switch (track.m_Shape)
536 {
537 case DynamicMusicLocationShape.BOX:
538 foreach (int locationId, array<vector> bounds : track.locationBoundaries)
539 {
540 if (Math.IsPointInRectangle(bounds[0], bounds[1], m_PlayerPosition))
541 {
544
545 #ifdef DIAG_DEVELOPER
546 DMPDebugPrint(string.Format("Player inside location <%1, %2>", bounds[0], bounds[1]));
547 #endif
548 }
549 }
550 break;
551 case DynamicMusicLocationShape.POLYGON:
552 if (Math2D.IsPointInPolygonXZ(track.vertices, m_PlayerPosition))
553 {
556
557 #ifdef DIAG_DEVELOPER
558 DMPDebugPrint(string.Format("Player inside polygon location at <%1>", m_PlayerPosition));
559 #endif
560 }
561 break;
562 }
563 }
564 }
565
566 return m_TracksLocationMatchedPlayerInside.Count() > 0;
567 }
ref array< ref DynamicMusicTrackData > m_TracksLocationMatchedPlayerInside
static prio + filtered by the distance between player and center of zone
Определения DynamicMusicPlayer.c:102
vector m_PlayerPosition
Определения DynamicMusicPlayer.c:110
const int INDEX_NOT_FOUND
Определения gameplay.c:13
enum WindingOrder Math2D()

Перекрестные ссылки INDEX_NOT_FOUND, Math::IsPointInRectangle(), m_PlayerPosition, m_TracksLocationMatchedPlayerInside и Math2D().

Используется в OnUpdate().