178 super.OnUpdate(timeslice);
211 float avgFps =
GetGame().GetFps();
223 GetGame().GetPlayer().SetPosition(FreeDebugCamera.GetInstance().GetPosition() -
"0 2.5 0");
257 float lerpX, lerpZ, lerpY;
274 FreeDebugCamera.GetInstance().SetPosition(
Vector(lerpX, lerpZ, lerpY) );
281 FreeDebugCamera.GetInstance().LookAt(
Vector(lerpX, lerpZ, lerpY) );
331 Print(
string.Format(
"================"));
338 FreeDebugCamera.GetInstance().SetPosition(loc.
m_StartPos);
341 FreeDebugCamera.GetInstance().LookAt(lookAtPos);
354 Print(
"Benchmark CSV file closed" );
358 Print(
string.Format(
"%1", reason));
360 FreeDebugCamera.GetInstance().SetActive(
false);
368 GetGame().SelectPlayer(NULL, player);
370 player.GetStatWater().Set(3000);
371 player.GetStatEnergy().Set(3000);
372 player.SetModifiers(
false);
373 player.SetAllowDamage(
false);
374 player.SetCanBeDestroyed(
false);
375 player.DisableSimulation(
true);
377 FreeDebugCamera.GetInstance().SetFOV(0.72);
378 FreeDebugCamera.GetInstance().SetActive(
true);
383 string fileName =
"benchmark";
384 if (
m_Config.m_CSVName !=
string.Empty)
392 Print(
"Benchmark .csv created");
397 protected void FPSLog(
string position,
float frames )
399 int year, month, day, hour, minute, second;
402 string timestamp =
string.Format(
"%1-%2-%3-%4-%5-%6", year, month, day, hour, minute, second );
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
void DoDevPrints(bool doPrints)
void AddLocation(notnull BenchmarkLocation loc)
ref array< ref BenchmarkLocation > m_Locations
void SetPreloadLengthTime(int seconds)
void AddQuickLocation(string name, vector pos, vector lookAtPos)
class BenchmarkLocation m_LogToRPT
void SetTestTimeMultiplier(float multiplier)
void SetCSVName(string name)
void LogToRPT(bool logRPT)
void SetLookAtPosition(vector start)
void SetCameraSpeedMultiplier(float multiplier)
void BenchmarkLocation(string name)
void SetPosition(vector start)
float m_CamSpeedMultiplier
const float STEP_INTERVAL
static MissionBenchmark m_Instance
void MeasureUpdate(float timeSlice)
void FPSLog(string position, float frames)
void OnBenchmarkEnd(string reason)
BenchmarkLocation m_CurrentLocation
const int INITIAL_PRELOAD
ref BenchmarkConfig m_Config
override void OnUpdate(float timeslice)
BenchmarkLocation m_NextLocation
BenchmarkConfig GetConfig()
static MissionBenchmark GetInstance()
void TeleportToPos(BenchmarkLocation loc)
void DisableWeatherChange()
proto native void SetDynVolFogHeightBias(float value, float time=0)
Sets the 'dynamic' volumetric height bias. Takes effect only if enabled via world config.
proto native void SetDynVolFogDistanceDensity(float value, float time=0)
Sets the dynamic volumetric fog distance density. Only takes effect if dynamic volumetric fog is enab...
proto native void SetDynVolFogHeightDensity(float value, float time=0)
Sets the dynamic volumetric fog height density. Only takes effect if dynamic volumetric fog is enable...
void SetWeatherUpdateFreeze(bool state)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto void Print(void var)
Prints content of variable to console/log.
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
proto void CloseFile(FileHandle file)
Close the File.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
proto void GetYearMonthDay(out int year, out int month, out int day)
Returns system date.
proto void GetHourMinuteSecondUTC(out int hour, out int minute, out int second)
Returns UTC system time.