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

◆ MeasureUpdate()

void MissionBenchmark::MeasureUpdate ( float timeSlice)
inlineprotected

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

207 {
208 m_MeasureStepTimer += timeSlice;
210 {
211 float avgFps = GetGame().GetFps();
212
213 if (m_Config.m_DoDevPrints)
214 Print( string.Format("Measure step: %1 | FPS: %2" , m_MeasuringStep + 1, 1/avgFps) );
215
216 /*if (m_MeasuringStep >= m_MeasureLength) // end of steps
217 { }
218 else*/ // next step
219
221 m_SumFPS += ( 1/avgFps );
223 GetGame().GetPlayer().SetPosition(FreeDebugCamera.GetInstance().GetPosition() - "0 2.5 0");
224 }
225
226 LerpCamera();
227 }
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:255
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().