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

◆ MeasureUpdate()

void MissionBenchmark::MeasureUpdate ( float timeSlice)
inlineprotected

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

205 {
206 m_MeasureStepTimer += timeSlice;
208 {
209 float avgFps = GetGame().GetFps();
210
211 if (m_Config.m_DoDevPrints)
212 Print( string.Format("Measure step: %1 | FPS: %2" , m_MeasuringStep + 1, 1/avgFps) );
213
214 /*if (m_MeasuringStep >= m_MeasureLength) // end of steps
215 { }
216 else*/ // next step
217
219 m_SumFPS += ( 1/avgFps );
221 GetGame().GetPlayer().SetPosition(FreeDebugCamera.GetInstance().GetPosition() - "0 2.5 0");
222 }
223
224 LerpCamera();
225 }
proto native float GetFps()
Returns average FPS of last 16 frames.
proto native DayZPlayer GetPlayer()
const float STEP_INTERVAL
Определения MissionBenchmark.c:114
float m_MeasureStepTimer
Определения MissionBenchmark.c:121
void LerpCamera()
Определения MissionBenchmark.c:243
ref BenchmarkConfig m_Config
Определения MissionBenchmark.c:131
float m_SumFPS
Определения MissionBenchmark.c:122
int m_MeasuringStep
Определения MissionBenchmark.c:120
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки CGame::GetFps(), GetGame(), CGame::GetPlayer(), LerpCamera(), m_Config, m_MeasureStepTimer, m_MeasuringStep, m_SumFPS, Print() и STEP_INTERVAL.

Используется в OnUpdate().