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

◆ OnTick()

override void AreaExposureMdfr::OnTick ( PlayerBase player,
float deltaT )
inlineprotected

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

66 {
67 #ifdef DEVELOPER
68 if(!player.GetCanBeDestroyed())
69 return;
70 #endif
71
72 float transmitted = TransmitAgents(player, AGENTS_PER_SEC * deltaT);
73
74 m_Time2 += deltaT;
75
76 if (transmitted)
77 {
78 m_Time1 += deltaT;
79 if (m_Time1 >= m_NextEvent1 )
80 {
81 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
82
83 if(Math.RandomFloat01() < 0.25)//creates a cough cooldown once in a while
84 {
85 m_NextEvent1 = Math.RandomFloatInclusive( EVENT_1_INTERVAL_MIN * 2, EVENT_1_INTERVAL_MAX * 2 );
86 }
87 else
88 {
89 m_NextEvent1 = Math.RandomFloatInclusive( EVENT_1_INTERVAL_MIN, EVENT_1_INTERVAL_MAX );
90 }
91
92 m_Time1 = 0;
93 }
94 }
95
96 if ( m_Time2 >= m_NextEvent2 )
97 {
99 m_Time2 = 0;
100 m_NextEvent2 = Math.RandomFloatInclusive( EVENT_2_INTERVAL_MIN, EVENT_2_INTERVAL_MAX );
101 }
102
103 ApplyAgentsToBleedingSources(player, deltaT);
104
105 }
void ApplyAgentsToBleedingSources(PlayerBase player, float deltaT)
Определения AreaExposure.c:107
const int EVENT_1_INTERVAL_MIN
Определения AreaExposure.c:3
const int EVENT_2_INTERVAL_MAX
Определения AreaExposure.c:11
float m_Time1
Определения AreaExposure.c:8
float TransmitAgents(PlayerBase player, float count)
Определения AreaExposure.c:141
const int EVENT_2_INTERVAL_MIN
Определения AreaExposure.c:10
void BleedingSourceCreateCheck(PlayerBase player)
Определения AreaExposure.c:116
float m_Time2
Определения AreaExposure.c:17
const float AGENTS_PER_SEC
Определения AreaExposure.c:6
float m_NextEvent1
Определения AreaExposure.c:7
const int EVENT_1_INTERVAL_MAX
Определения AreaExposure.c:4
float m_NextEvent2
Определения AreaExposure.c:16

Перекрестные ссылки AGENTS_PER_SEC, ApplyAgentsToBleedingSources(), BleedingSourceCreateCheck(), EVENT_1_INTERVAL_MAX, EVENT_1_INTERVAL_MIN, EVENT_2_INTERVAL_MAX, EVENT_2_INTERVAL_MIN, m_NextEvent1, m_NextEvent2, m_Time1, m_Time2, Math::RandomFloat01(), Math::RandomFloatInclusive() и TransmitAgents().