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

◆ CheckAllowUpdate()

void CheckAllowUpdate ( )

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

142 {
143 if( GetGame().GetPlayer() )
144 {
145 bool is_at_hearing_distance = vector.Distance(GetGame().GetPlayer().GetPosition(), m_Player.GetPosition()) < SOUNDS_HEARING_DISTANCE;
146
147 if( m_UpdateTimerRunning && !is_at_hearing_distance )
148 {
149 SetAllowUpdate(false);
150 }
151 else if( !m_UpdateTimerRunning && is_at_hearing_distance )
152 {
153 SetAllowUpdate(true);
154 }
155 //PrintString("distance:" + vector.Distance(GetGame().GetPlayer().GetPosition(), m_Player.GetPosition()).ToString());
156 }
157 }
DayZPlayer m_Player
Определения Hand_Events.c:42
PlayerBase GetPlayer()
Определения ModifierBase.c:51
void SetAllowUpdate(bool enable)
Определения PlayerSoundManager.c:111
const float SOUNDS_HEARING_DISTANCE
Определения PlayerSoundManager.c:2
bool m_UpdateTimerRunning
Определения PlayerSoundManager.c:88
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
Определения EnConvert.c:106
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки vector::Distance(), GetGame(), GetPlayer(), GetPosition, m_Player, m_UpdateTimerRunning, SetAllowUpdate() и SOUNDS_HEARING_DISTANCE.