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

◆ PlayerInsideOfLocationFilter() [1/2]

bool PlayerInsideOfLocationFilter ( array< ref DynamicMusicTrackData > locations)
private

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

584 {
586
587 if (locations.Count() > 0)
588 {
589 foreach (DynamicMusicTrackData track : locations)
590 {
591 switch (track.m_Shape)
592 {
593 case DynamicMusicLocationShape.BOX:
594 foreach (int locationId, array<vector> bounds : track.locationBoundaries)
595 {
596 if (Math.IsPointInRectangle(bounds[0], bounds[1], m_PlayerPosition))
597 {
600
601 #ifdef ENABLE_LOGGING
602 DMPDebugPrint(string.Format("Player inside location <%1, %2>", bounds[0], bounds[1]));
603 #endif
604 }
605 }
606 break;
607 case DynamicMusicLocationShape.POLYGON:
608 if (Math2D.IsPointInPolygonXZ(track.vertices, m_PlayerPosition))
609 {
612
613 #ifdef ENABLE_LOGGING
614 DMPDebugPrint(string.Format("Player inside polygon location at <%1>", m_PlayerPosition));
615 #endif
616 }
617 break;
618 }
619 }
620 }
621
622 return m_TracksLocationMatchedPlayerInside.Count() > 0;
623 }
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().