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

◆ Tick()

void Land_WarheadStorage_PowerStation::Tick ( )
inlineprotected

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

140 {
141 bool updated = false;
142 for (int index = 1; index <= 4; index++)
143 {
144 float animPhase = GetAnimationPhase(GetLeverComponentNameByLeverIndex(index));
145 int bit = 1 << (index - 1);
146
147 if (animPhase == 0)
148 {
149 if ((bit & m_LeverStatesBits) != 0)
150 {
151 // in the bitmask, this lever is set as ON, but the anim phase is saying it should be OFF, turn the bit off
153 updated = true;
154 }
155 }
156 else if (animPhase == 1)
157 {
158 if ((bit & m_LeverStatesBits) == 0)
159 {
160 // in the bitmask, this lever is set as OFF, but the anim phase is saying it should be ON, turn the bit on
162 updated = true;
163
165 }
166 }
167 }
168 if (updated)
169 {
170 m_PowerGenerator.StoreLeverStates(m_LeverStatesBits);
173 }
174
176 }
string GetLeverComponentNameByLeverIndex(int leverIndex)
PowerGeneratorStatic m_PowerGenerator

Перекрестные ссылки CheckStopTimer(), GetLeverComponentNameByLeverIndex(), m_LastActivatedLeverId, m_LeverStatesBits, m_PowerGenerator, OnLeverToggled() и UpdateLeverStatesServer().