178 super.OnUpdate(timeslice);
223 GetGame().
GetPlayer().SetPosition(FreeDebugCamera.GetInstance().GetPosition() -
"0 2.5 0");
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);
340 FreeDebugCamera.GetInstance().LookAt(lookAtPos);
353 Print(
"Benchmark CSV file closed" );
357 Print(
string.Format(
"%1", reason));
359 FreeDebugCamera.GetInstance().SetActive(
false);
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
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
proto native void SelectPlayer(PlayerIdentity identity, Object player)
Selects player's controlled object.
proto native Entity CreatePlayer(PlayerIdentity identity, string name, vector pos, float radius, string spec)
Assign player entity to client (in multiplayer)
proto native void RequestExit(int code)
Sets exit code and quits in the right moment.
proto native float GetFps()
Returns average FPS of last 16 frames.
proto native DayZPlayer GetPlayer()
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()
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 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.
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.