4 bool m_IsDummyTeleport;
6 float m_CamSpeedMultiplier = 1;
16 void SetPosition(
vector start)
18 m_StartPos = start +
"0 2.5 0";
22 void SetLookAtPosition(
vector start)
24 m_StartLookAtPos = start;
27 void SetCameraSpeedMultiplier(
float multiplier)
29 m_CamSpeedMultiplier = multiplier;
32 void SetDummyTeleport()
34 m_IsDummyTeleport =
true;
63 loc.SetLookAtPosition(lookAtPos);
71 loc.SetDummyTeleport();
178 super.OnUpdate(timeslice);
211 float avgFps =
GetGame().GetFps();
223 GetGame().GetPlayer().SetPosition(FreeDebugCamera.GetInstance().GetPosition() -
"0 2.5 0");
232 weather.SetDynVolFogHeightBias(0,0);
233 weather.SetDynVolFogHeightDensity(0,0);
234 weather.SetDynVolFogDistanceDensity(0,0);
236 weather.SetWeatherUpdateFreeze(
true);
257 float lerpX, lerpZ, lerpY;
272 FreeDebugCamera.GetInstance().SetPosition(
Vector(lerpX, lerpZ, lerpY) );
279 FreeDebugCamera.GetInstance().LookAt(
Vector(lerpX, lerpZ, lerpY) );
330 Print(
string.Format(
"================"));
337 FreeDebugCamera.GetInstance().SetPosition(loc.m_StartPos);
338 vector lookAtPos = loc.m_StartLookAtPos;
339 lookAtPos[1] = loc.m_StartPos[1];
340 FreeDebugCamera.GetInstance().LookAt(lookAtPos);
353 Print(
"Benchmark CSV file closed" );
357 Print(
string.Format(
"%1", reason));
359 FreeDebugCamera.GetInstance().SetActive(
false);
367 GetGame().SelectPlayer(NULL, player);
369 player.GetStatWater().Set(3000);
370 player.GetStatEnergy().Set(3000);
371 player.SetAllowDamage(
false);
372 player.SetCanBeDestroyed(
false);
373 player.DisableSimulation(
true);
375 FreeDebugCamera.GetInstance().SetFOV(0.72);
376 FreeDebugCamera.GetInstance().SetActive(
true);
381 string fileName =
"benchmark";
382 if (
m_Config.m_CSVName !=
string.Empty)
390 Print(
"Benchmark .csv created");
395 protected void FPSLog(
string position,
float frames )
397 int year, month, day, hour, minute, second;
400 string timestamp =
string.Format(
"%1-%2-%3-%4-%5-%6", year, month, day, hour, minute, second );
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native Weather GetWeather()
Returns weather controller object.
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()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
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.
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.
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)