176 super.OnUpdate(timeslice);
221 GetGame().
GetPlayer().SetPosition(FreeDebugCamera.GetInstance().GetPosition() -
"0 2.5 0");
245 float lerpX, lerpZ, lerpY;
260 FreeDebugCamera.GetInstance().SetPosition(
Vector(lerpX, lerpZ, lerpY) );
267 FreeDebugCamera.GetInstance().LookAt(
Vector(lerpX, lerpZ, lerpY) );
318 Print(
string.Format(
"================"));
325 FreeDebugCamera.GetInstance().SetPosition(loc.
m_StartPos);
328 FreeDebugCamera.GetInstance().LookAt(lookAtPos);
341 Print(
"Benchmark CSV file closed" );
345 Print(
string.Format(
"%1", reason));
347 FreeDebugCamera.GetInstance().SetActive(
false);
357 player.GetStatWater().Set(3000);
358 player.GetStatEnergy().Set(3000);
359 player.SetAllowDamage(
false);
360 player.SetCanBeDestroyed(
false);
362 FreeDebugCamera.GetInstance().SetFOV(0.72);
363 FreeDebugCamera.GetInstance().SetActive(
true);
368 string fileName =
"benchmark";
369 if (
m_Config.m_CSVName !=
string.Empty)
377 Print(
"Benchmark .csv created");
382 protected void FPSLog(
string position,
float frames )
384 int year, month, day, hour, minute, second;
387 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()
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)
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.