MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / UpdateConditionTime

Method UpdateConditionTime

ogsr_engine/xrGame/EntityCondition.cpp:173–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void CEntityCondition::UpdateConditionTime()
174{
175 u64 _cur_time = Level().GetGameTime();
176
177 if (m_bTimeValid)
178 {
179 if (_cur_time > m_iLastTimeCalled)
180 {
181 float x = float(_cur_time - m_iLastTimeCalled) / 1000.0f;
182 SetConditionDeltaTime(x);
183 }
184 else
185 SetConditionDeltaTime(0.0f);
186 }
187 else
188 {
189 SetConditionDeltaTime(0.0f);
190 m_bTimeValid = true;
191
192 m_fDeltaHealth = 0;
193 m_fDeltaPower = 0;
194 m_fDeltaRadiation = 0;
195 m_fDeltaEntityMorale = 0;
196 }
197
198 m_iLastTimeCalled = _cur_time;
199}
200
201//вычисление параметров с ходом игрового времени
202void CEntityCondition::UpdateCondition()

Callers 2

UpdateConditionMethod · 0.80
shedule_UpdateMethod · 0.80

Calls 1

GetGameTimeMethod · 0.45

Tested by

no test coverage detected