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

◆ PlayerInsideOfLocationFilter() [1/2]

bool PlayerInsideOfLocationFilter ( array< ref DynamicMusicTrackData > locations)
private

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

581 {
583
584 if (locations.Count() > 0)
585 {
586 foreach (DynamicMusicTrackData track : locations)
587 {
588 switch (track.m_Shape)
589 {
590 case DynamicMusicLocationShape.BOX:
591 foreach (int locationId, array<vector> bounds : track.locationBoundaries)
592 {
593 if (Math.IsPointInRectangle(bounds[0], bounds[1], m_PlayerPosition))
594 {
597
598 #ifdef ENABLE_LOGGING
599 DMPDebugPrint(string.Format("Player inside location <%1, %2>", bounds[0], bounds[1]));
600 #endif
601 }
602 }
603 break;
604 case DynamicMusicLocationShape.POLYGON:
605 if (Math2D.IsPointInPolygonXZ(track.vertices, m_PlayerPosition))
606 {
609
610 #ifdef ENABLE_LOGGING
611 DMPDebugPrint(string.Format("Player inside polygon location at <%1>", m_PlayerPosition));
612 #endif
613 }
614 break;
615 }
616 }
617 }
618
619 return m_TracksLocationMatchedPlayerInside.Count() > 0;
620 }
ref array< ref DynamicMusicTrackData > m_TracksLocationMatchedPlayerInside
static prio + filtered by the distance between player and center of zone
Определения DynamicMusicPlayer.c:116
vector m_PlayerPosition
Определения DynamicMusicPlayer.c:124
Определения EnMath.c:7
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const int INDEX_NOT_FOUND
Определения gameplay.c:13
enum WindingOrder Math2D()
static proto bool IsPointInRectangle(vector mi, vector ma, vector p)
Returns if point is inside rectangle.

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

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