DayZ 1.24
Loading...
Searching...
No Matches
CGame Class Reference
Collaboration diagram for CGame:
[legend]

Protected Member Functions

void SetConnectivityStatState (EConnectivityStatType type, EConnectivityStatLevel level)
 
bool OnConnectivityStatChange (EConnectivityStatType type, EConnectivityStatLevel newLevel, EConnectivityStatLevel oldLevel)
 
void AddVoiceNotification (VONStopSpeakingEventParams vonStartParams)
 
void RemoveVoiceNotification (VONStopSpeakingEventParams vonStopParams)
 
void UpdateLoginQueue (float timeslice)
 
void OnLoginTimeEvent (int loginTime)
 
void LoginTimeCountdown ()
 
void OnRespawnEvent (int time)
 
void OnPreloadEvent (vector pos)
 
void StoreLoginDataPrepare ()
 
void EnterLoginQueue (UIMenuPanel parent)
 
void EnterLoginTime (UIMenuPanel parent)
 
void OnMPConnectionLostEvent (int duration)
 
void LoadProgressUpdate (int progressState, float progress, string title)
 
override void OnAfterCreate ()
 
override void OnActivateMessage ()
 
override void OnDeactivateMessage ()
 
override bool OnInitialize ()
 
void InitNotifications ()
 
string GetDatabaseID ()
 
void SetDatabaseID (string id)
 
void CreateTitleScreen ()
 
void DeleteTitleScreen ()
 
bool ShouldShowControllerDisconnect ()
 
void UpdateInputDeviceDisconnectWarning ()
 
void JoinLaunch ()
 
void ConnectLaunch ()
 
void PartyLaunch ()
 
void MainMenuLaunch ()
 
void MissionLaunch ()
 
void SelectUser (int gamepad=-1)
 
void SetPreviousGamepad (int gamepad)
 
int GetPreviousGamepad ()
 
void GamepadCheck ()
 
void SelectGamepad ()
 
void TryConnect ()
 
bool GetLastVisitedServer (out string ip, out int port)
 
void AddVisitedServer (string ip, int port)
 
bool IsVisited (string ip, int port)
 
void RefreshCurrentServerInfo ()
 
void Connect ()
 
void DisconnectSessionScript (bool displayJoinError=false)
 
void DisconnectSessionEx (DisconnectSessionFlags flags)
 
void ConnectFromServerBrowser (string ip, int port, string password="")
 
void ConnectFromJoin (string ip, int port)
 
void ConnectFromCLI ()
 
bool IsLeftCtrlDown ()
 
override void OnKeyPress (int key)
 
override void OnKeyRelease (int key)
 
override void OnMouseButtonPress (int button)
 
override void OnMouseButtonRelease (int button)
 
override void OnDeviceReset ()
 
float GetDeltaT ()
 
override void OnUpdate (bool doSim, float timeslice)
 
override void OnPostUpdate (bool doSim, float timeslice)
 
override void OnRPC (PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
 
void DelayedMidAirDetonation (float x, float y, float z)
 
void CheckDialogs ()
 
void SetConnecting (bool value)
 Returns true when connecting to server.
 
bool IsConnecting ()
 
bool IsLoading ()
 
void SetKeyboardHandle (UIScriptedMenu handler)
 
void LoadingShow ()
 
void LoadingHide (bool force=false)
 
override string CreateDefaultPlayer ()
 
override string CreateRandomPlayer ()
 
override TStringArray ListAvailableCharacters ()
 
void ExplosionEffectsEx (Object source, Object directHit, int componentIndex, float energyFactor, float explosionFactor, HitInfo hitInfo)
 
void ExplosionEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
 
void OnProjectileStopped (ProjectileStoppedInfo info)
 
void OnProjectileStoppedInTerrain (TerrainCollisionInfo info)
 
void OnProjectileStoppedInObject (ObjectCollisionInfo info)
 
void FirearmEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, vector exitPos, vector inSpeed, vector outSpeed, bool isWater, bool deflected, string ammoType)
 
void CloseCombatEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, bool isWater, string ammoType)
 
void UpdateVoiceLevel (int level)
 
void InitCharacterMenuDataInfo (int menudata_count)
 
void SetPlayerGameName (string name)
 
string GetPlayerGameName ()
 
void SetNewCharacter (bool state)
 
bool IsNewCharacter ()
 
void SetUserFOV (float pFov)
 
float GetUserFOV ()
 
float GetFOVByZoomType (ECameraZoomType type)
 
void SetHudBrightness (float value)
 
float GetHUDBrightnessSetting ()
 
void SetEVValue (float value)
 
float GetCurrentEVValue ()
 
float GetPreviousEVValue ()
 
int GetCurrentDisplayLanguageIdx ()
 
bool IsWorldWetTempUpdateEnabled ()
 
bool IsFoodDecayEnabled ()
 
float GetFoodDecayModifier ()
 
array< intGetConnectedInputDeviceList ()
 
void SetMouseCursorDesiredVisibility (bool visible)
 
bool GetMouseCursorDesiredVisibility ()
 
bool CanDisplayMouseCursor ()
 extend as needed, only game focus and M&K setting (consoles only!) are checked natively
 
void RefreshMouseCursorVisibility ()
 
BillboardSetHandler GetBillboardHandler ()
 
void CreateGamepadDisconnectMenu ()
 
void DeleteGamepadDisconnectMenu ()
 
native void CreateMission (string path)
 Create only enforce script mission, used for mission script reloading.
 
proto native void RestartMission ()
 
proto native void AbortMission ()
 Returns to main menu, leave world empty for using last mission world.
 
proto native void RespawnPlayer ()
 
proto native bool CanRespawnPlayer ()
 
proto native void SetLoginTimerFinished ()
 
proto native void SetMainMenuWorld (string world)
 
proto native owned string GetMainMenuWorld ()
 
proto native void LogoutRequestTime ()
 Logout methods.
 
proto native void LogoutRequestCancel ()
 
proto native bool IsMultiplayer ()
 
proto native bool IsClient ()
 
proto native bool IsServer ()
 
proto native bool IsDedicatedServer ()
 Robust check which is preferred than the above, as it is valid much sooner.
 
proto native int ServerConfigGetInt (string name)
 Server config parsing. Returns 0 if not found.
 
proto native bool IsDebug ()
 
void SetDebugMonitorEnabled (int value)
 
bool IsDebugMonitor ()
 
proto native void GetPlayerIndentities (out array< PlayerIdentity > identities)
 
proto native float SurfaceY (float x, float z)
 
proto native float SurfaceRoadY (float x, float z, RoadSurfaceDetection rsd=RoadSurfaceDetection.LEGACY)
 
proto native float SurfaceRoadY3D (float x, float y, float z, RoadSurfaceDetection rsd)
 
proto void SurfaceGetType (float x, float z, out string type)
 
proto void SurfaceGetType3D (float x, float y, float z, out string type)
 
proto void SurfaceUnderObject (notnull Object object, out string type, out int liquidType)
 
proto void SurfaceUnderObjectEx (notnull Object object, out string type, out string impact, out int liquidType)
 
proto void SurfaceUnderObjectByBone (notnull Object object, int boneType, out string type, out int liquidType)
 
proto native float SurfaceGetNoiseMultiplier (Object directHit, vector pos, int componentIndex)
 
proto native vector SurfaceGetNormal (float x, float z)
 
proto native float SurfaceGetSeaLevel ()
 
proto native bool SurfaceIsSea (float x, float z)
 
proto native bool SurfaceIsPond (float x, float z)
 
proto native float GetWaterDepth (vector posWS)
 
proto native void UpdatePathgraphRegion (vector regionMin, vector regionMax)
 
float GetHighestSurfaceYDifference (array< vector > positions)
 Returns the largest height difference between the given positions.
 
vector GetSurfaceOrientation (float x, float z)
 Returns tilt of the ground on the given position in degrees, so you can use this value to rotate any item according to terrain.
 
bool IsSurfaceDigable (string surface)
 Checks if the surface is digable.
 
bool IsSurfaceFertile (string surface)
 Checks if the surface is fertile.
 
void UpdatePathgraphRegionByObject (Object object)
 
proto native bool IsBoxColliding (vector center, vector orientation, vector edgeLength, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
 Finds all objects that are in choosen oriented bounding box (OBB)
 
proto native bool IsBoxCollidingGeometry (vector center, vector orientation, vector edgeLength, int iPrimaryType, int iSecondaryType, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
 Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)
 
proto native bool IsBoxCollidingGeometryProxy (notnull BoxCollidingParams params, array< Object > excludeObjects, array< ref BoxCollidingResult > collidedObjects=NULL)
 
proto native Weather GetWeather ()
 Returns weather controller object.
 
proto native void SetEVUser (float value)
 Sets custom camera camera EV. range: -50.0..50.0? //TODO.
 
proto native void OverrideDOF (bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)
 
proto native void AddPPMask (float ndcX, float ndcY, float ndcRadius, float ndcBlur)
 
proto native void ResetPPMask ()
 
proto native void OverrideInventoryLights (vector diffuse, vector ambient, vector ground, vector dir)
 
proto native void NightVissionLightParams (float lightIntensityMul, float noiseIntensity)
 
proto native void OpenURL (string url)
 
proto native void InitDamageEffects (Object effect)
 Initialization of damage effects.
 
proto native EntityAI GetEntityByPersitentID (int b1, int b2, int b3, int b4)
 
bool IsKindOf (string cfg_class_name, string cfg_parent_name)
 Returns is class name inherited from parent class name.
 
bool ObjectIsKindOf (Object object, string cfg_parent_name)
 Returns is object inherited from parent class name.
 
int ConfigFindClassIndex (string config_path, string searched_member)
 
proto int GetTime ()
 returns mission time in milliseconds
 
ScriptCallQueue GetCallQueue (int call_category)
 
ScriptInvoker GetUpdateQueue (int call_category)
 
ScriptInvoker GetPostUpdateQueue (int call_category)
 
TimerQueue GetTimerQueue (int call_category)
 
DragQueue GetDragQueue ()
 
string CreateDefaultPlayer ()
 returns class name of first valid survivor (TODO address confusing naming?)
 
string CreateRandomPlayer ()
 returns class name of random survivor (TODO address confusing naming?)
 
TStringArray ListAvailableCharacters ()
 outputs array of all valid survivor class names
 
bool IsInventoryOpen ()
 
proto native BiosUserManager GetUserManager ()
 
proto native ContentDLC GetContentDLCService ()
 Return DLC service (service for entitlement keys for unlock content)
 
bool IsMissionMainMenu ()
 Returns true when current mission is Main Menu.
 
MenuDefaultCharacterData GetMenuDefaultCharacterData (bool fill_data=true)
 
AnalyticsManagerServer GetAnalyticsServer ()
 
AnalyticsManagerClient GetAnalyticsClient ()
 

Static Protected Member Functions

static float GetUserFOVFromConfig ()
 
static bool CheckAmmoCompability (EntityAI weaponInHand, EntityAI ammo)
 
static bool IsDigitalCopy ()
 

Protected Attributes

ref BillboardSetHandler m_BillboardSetHandler
 
const int MISSION_STATE_MAINMENU = 0
 
const int MISSION_STATE_GAME = 1
 
const int MISSION_STATE_FINNISH = 2
 
DayZGameState m_GameState
 
DayZLoadState m_LoadState
 
ref NotificationUI m_Notifications
 
bool m_FirstConnect = true
 
ref LoadingScreen m_loading
 
ref Widget m_IntroMenu
 
ref Widget m_GamepadDisconnectMenu
 
int m_PrevBlur
 
string m_DatabaseID
 
string m_ConnectAddress
 
int m_ConnectPort
 
string m_ConnectPassword
 
const int MAX_VISITED = 50
 
ref TStringArray m_Visited
 
const float ARROW_PIERCE_DEPTH = 0.05
 

Private Member Functions

void DayZGame ()
 
void ~DayZGame ()
 
void DeferredInit ()
 
void GlobalsInit ()
 
void RegisterProfilesOptions ()
 
void ResetProfileOptions ()
 
void SetMissionPath (string path)
 Called from C++.
 
string GetMissionPath ()
 
string GetMissionFolderPath ()
 
override ScriptCallQueue GetCallQueue (int call_category)
 
override ScriptInvoker GetUpdateQueue (int call_category)
 
override ScriptInvoker GetPostUpdateQueue (int call_category)
 
override TimerQueue GetTimerQueue (int call_category)
 
override DragQueue GetDragQueue ()
 
void OnGameplayDataHandlerLoad ()
 
int GetMissionState ()
 
void SetMissionState (int state)
 
bool GetProfileOption (EDayZProfilesOptions option)
 
bool GetProfileOptionBool (EDayZProfilesOptions option)
 
int GetProfileOptionInt (EDayZProfilesOptions option)
 
float GetProfileOptionFloat (EDayZProfilesOptions option)
 
bool GetProfileOptionDefault (EDayZProfilesOptions option)
 
bool GetProfileOptionDefaultBool (EDayZProfilesOptions option)
 
int GetProfileOptionDefaultInt (EDayZProfilesOptions option)
 
float GetProfileOptionDefaultFloat (EDayZProfilesOptions option)
 
void SetProfileOption (EDayZProfilesOptions option, bool value)
 
void SetProfileOptionBool (EDayZProfilesOptions option, bool value)
 
void SetProfileOptionInt (EDayZProfilesOptions option, int value)
 
void SetProfileOptionFloat (EDayZProfilesOptions option, float value)
 
map< EDayZProfilesOptions, ref DayZProfilesOptionGetProfileOptionMap ()
 
bool IsStressTest ()
 
bool IsAimLogEnabled ()
 
void SetGameState (DayZGameState state)
 
DayZGameState GetGameState ()
 
void SetLoadState (DayZLoadState state)
 
DayZLoadState GetLoadState ()
 
Backlit GetBacklit ()
 
override bool IsInventoryOpen ()
 
void EarlyAccessDialog (UIScriptedMenu parent)
 
override UIScriptedMenu CreateScriptedMenu (int id)
 create custom main menu part (submenu)
 
void ReloadMission ()
 
void CancelLoginQueue ()
 
void CancelLoginTimeCountdown ()
 
void ClearConnectivityStates ()
 
override void OnEvent (EventType eventTypeId, Param params)
 
void CGame ()
 
void ~CGame ()
 
proto native WorkspaceWidget GetWorkspace ()
 
proto native WorkspaceWidget GetLoadingWorkspace ()
 
void OnEvent (EventType eventTypeId, Param params)
 Called when some system event occur.
 
void OnProcessLifetimeChanged (int plmtype)
 
void OnLicenseChanged ()
 
void OnAfterCreate ()
 Called after creating of CGame instance.
 
void OnActivateMessage ()
 Called when recieving focus (windows)
 
void OnDeactivateMessage ()
 Called when loosing focus (windows)
 
bool OnInitialize ()
 Called once before game update loop starts, ret value indicates if init was done in scripts, otherwise it is done in the engine.
 
void OnDeviceReset ()
 Called when inputs is not possible (Steam overlay active or something), all internal script variables should be reset here!
 
void OnUpdate (bool doSim, float timeslice)
 Called on World update.
 
void OnPostUpdate (bool doSim, float timeslice)
 Called on World update after simulation of entities.
 
void OnKeyPress (int key)
 Called when key is pressed.
 
void OnKeyRelease (int key)
 Called when key is released.
 
void OnMouseButtonPress (int button)
 Called when mouse button is pressed.
 
void OnMouseButtonRelease (int button)
 Called when mouse button is released.
 
UIScriptedMenu CreateScriptedMenu (int id)
 create custom main menu part (submenu)
 
UIScriptedWindow CreateScriptedWindow (int id)
 create custom window part
 
void OnRPC (PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
 Called after remote procedure call is recieved for this object.
 
proto native void RequestExit (int code)
 Sets exit code and quits in the right moment.
 
proto native void RequestRestart (int code)
 Sets exit code and restart in the right moment.
 
proto native bool IsAppActive ()
 Returns if the application is focused on PC, returns true always on console.
 
proto bool GetHostAddress (out string address, out int port)
 Gets the server address. (from client)
 
proto owned string GetHostName ()
 Gets the server name. (from client)
 
proto GetServersResultRow GetHostData ()
 Gets the server data. (from client)
 
proto native int Connect (UIScriptedMenu parent, string IpAddress, int port, string password)
 Connects to IsServer.
 
proto native int ConnectLastSession (UIScriptedMenu parent, int selectedCharacter=-1)
 Connects to last success network session.
 
proto native void DisconnectSession ()
 Disconnects from current multiplayer session.
 
proto native void DisconnectSessionForce ()
 Forces disconnect from current multiplayer session even if not yet in the game.
 
proto native void GetProfileStringList (string name, out TStringArray values)
 Gets array of strings from profile variable.
 
proto bool GetProfileString (string name, out string value)
 Gets string from profile variable.
 
proto native void SetProfileStringList (string name, TStringArray values)
 Sets array of strings to profile variable.
 
proto native void SetProfileString (string name, string value)
 Sets string to profile variable.
 
proto native void SaveProfile ()
 Saves profile on disk.
 
proto void GetPlayerName (out string name)
 Gets current player name.
 
proto void GetPlayerNameShort (int maxLength, out string name)
 Gets current player name. If length of player name is grater than maxLength, then it is omitted and append ellipsis.
 
proto native void SetPlayerName (string name)
 Sets current player name.
 
proto native Entity CreatePlayer (PlayerIdentity identity, string name, vector pos, float radius, string spec)
 Assign player entity to client (in multiplayer)
 
proto native void SelectPlayer (PlayerIdentity identity, Object player)
 Selects player's controlled object.
 
proto void GetPlayerNetworkIDByIdentityID (int playerIdentityID, out int networkIdLowBits, out int networkIdHightBits)
 returns player's network id from identity id in out parameters
 
proto native Object GetObjectByNetworkId (int networkIdLowBits, int networkIdHighBits)
 Returns entity identified by network id.
 
proto native bool RegisterNetworkStaticObject (Object object)
 Static objects cannot be replicated by default (there are too many objects on the map). Use this method when you want to replicate some scripted variables. Cannot be called in object's constructor, because networking is not initialized yet.
 
proto native void SelectSpectator (PlayerIdentity identity, string spectatorObjType, vector position)
 Creates spectator object (mostly cameras)
 
proto native void UpdateSpectatorPosition (vector position)
 Updates spectator position on server = position of network bubble.
 
proto native void SendLogoutTime (Object player, int time)
 Inform client about logout time (creates logout screen on specified client)
 
proto native void DisconnectPlayer (PlayerIdentity identity, string uid="")
 Destroy player info and disconnect.
 
proto native void AddToReconnectCache (PlayerIdentity identity)
 Add player to reconnect cache to be able to rejoin character still existing in the world.
 
proto native void RemoveFromReconnectCache (string uid)
 Remove player from reconnect cache.
 
proto native void ClearReconnectCache ()
 Remove all player from reconnect cache.
 
proto native void StorageVersion (int iVersion)
 Set actual storage version - for next save.
 
proto native int LoadVersion ()
 Returns actual storage version - loading.
 
proto native int SaveVersion ()
 Returns actual storage version - saving.
 
proto native float GetDayTime ()
 Returns current daytime on server.
 
proto bool ConfigGetText (string path, out string value)
 Get string value from config on path.
 
proto bool ConfigGetTextRaw (string path, out string value)
 Get raw string value from config on path.
 
string ConfigGetTextOut (string path)
 Get string value from config on path.
 
bool FormatRawConfigStringKeys (inout string value)
 Changes localization key format to script-friendly format.
 
string GetModelName (string class_name)
 Get name of the p3d file of the given class name.
 
proto native float ConfigGetFloat (string path)
 Get float value from config on path.
 
proto native vector ConfigGetVector (string path)
 Get vector value from config on path.
 
proto native int ConfigGetInt (string path)
 Get int value from config on path.
 
proto native int ConfigGetType (string path)
 Returns type of config value.
 
proto native void ConfigGetTextArray (string path, out TStringArray values)
 Get array of strings from config on path.
 
proto native void ConfigGetTextArrayRaw (string path, out TStringArray values)
 Get array of raw strings from config on path.
 
proto native void ConfigGetFloatArray (string path, out TFloatArray values)
 Get array of floats from config on path.
 
proto native void ConfigGetIntArray (string path, out TIntArray values)
 Get array of integers from config on path.
 
proto bool ConfigGetChildName (string path, int index, out string name)
 Get name of subclass in config class on path.
 
proto bool ConfigGetBaseName (string path, out string base_name)
 Get name of base class of config class on path.
 
proto native int ConfigGetChildrenCount (string path)
 Get count of subclasses in config class on path.
 
proto native bool ConfigIsExisting (string path)
 
proto native void ConfigGetFullPath (string path, out TStringArray full_path)
 
proto native void ConfigGetObjectFullPath (Object obj, out TStringArray full_path)
 
proto native void GetModInfos (notnull out array< ref ModInfo > modArray)
 
proto native bool GetModToBeReported ()
 
string ConfigPathToString (TStringArray array_path)
 Converts array of strings into single string.
 
proto bool CommandlineGetParam (string name, out string value)
 Get command line parameter value.
 
proto native void CopyToClipboard (string text)
 
proto void CopyFromClipboard (out string text)
 
proto native void BeginOptionsVideo ()
 
proto native void EndOptionsVideo ()
 
proto native void AdminLog (string text)
 
proto native bool PreloadObject (string type, float distance)
 Preload objects with certain type in certain distance from camera.
 
proto native Object CreateStaticObjectUsingP3D (string p3dFilename, vector position, vector orientation, float scale=1.0, bool createLocal=false)
 
proto native Object CreateObject (string type, vector pos, bool create_local=false, bool init_ai=false, bool create_physics=true)
 Creates object of certain type.
 
proto native SoundOnVehicle CreateSoundOnObject (Object source, string sound_name, float distance, bool looped, bool create_local=false)
 
proto native SoundWaveOnVehicle CreateSoundWaveOnObject (Object source, SoundObject soundObject, AbstractWave soundWave)
 
proto native Object CreateObjectEx (string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
 Creates object of certain type.
 
proto native void ObjectDelete (Object obj)
 
proto native void ObjectDeleteOnClient (Object obj)
 
proto native void RemoteObjectDelete (Object obj)
 
proto native void RemoteObjectTreeDelete (Object obj)
 RemoteObjectDelete - deletes only remote object (unregisters from network). do not use if not sure what you do.
 
proto native void RemoteObjectCreate (Object obj)
 RemoteObjectDelete - deletes only remote object tree (unregisters from network). do not use if not sure what you do.
 
proto native void RemoteObjectTreeCreate (Object obj)
 RemoteObjectCreate - postponed registration of network object (and creation of remote object). do not use if not sure what you do.
 
proto native int ObjectRelease (Object obj)
 RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote objects). do not use if not sure what you do.
 
proto void ObjectGetType (Object obj, out string type)
 
proto void ObjectGetDisplayName (Object obj, out string name)
 
proto native vector ObjectGetSelectionPosition (Object obj, string name)
 
proto native vector ObjectGetSelectionPositionLS (Object obj, string name)
 
proto native vector ObjectGetSelectionPositionMS (Object obj, string name)
 
proto native vector ObjectGetSelectionPositionWS (Object obj, string name)
 
proto native vector ObjectModelToWorld (Object obj, vector modelPos)
 
proto native vector ObjectWorldToModel (Object obj, vector worldPos)
 
proto native bool IsObjectAccesible (EntityAI item, Man player)
 returns true if player can access item's cargo/attachments (check only distance)
 
proto native Input GetInput ()
 
proto native vector GetCurrentCameraPosition ()
 
proto native vector GetCurrentCameraDirection ()
 
proto native AbstractSoundScene GetSoundScene ()
 
proto native NoiseSystem GetNoiseSystem ()
 
proto native bool AddInventoryJuncture (Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms)
 
bool AddInventoryJunctureEx (Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms)
 
proto native bool HasInventoryJunctureItem (notnull EntityAI item)
 
proto native bool HasInventoryJunctureDestination (Man player, notnull InventoryLocation dst)
 
proto native bool AddActionJuncture (Man player, notnull EntityAI item, int timeout_ms)
 
proto native bool ExtendActionJuncture (Man player, notnull EntityAI item, int timeout_ms)
 
proto native bool ClearJuncture (Man player, notnull EntityAI item)
 
bool ClearJunctureEx (Man player, notnull EntityAI item)
 
proto native bool ExecuteEnforceScript (string expression, string mainFnName)
 Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script console.
 
proto native void DumpInstances (bool csvFormatting)
 Delevoper only: Dump all script allocations.
 
proto native bool ScriptTest ()
 
proto native void GetDiagModeNames (out TStringArray diag_names)
 Get list of all debug modes.
 
proto native void SetDiagModeEnable (int diag_mode, bool enabled)
 Set specific debug mode.
 
proto native bool GetDiagModeEnable (int diag_mode)
 Gets state of specific debug mode.
 
proto native void GetDiagDrawModeNames (out TStringArray diag_names)
 Get list of all debug draw modes.
 
proto native void SetDiagDrawMode (int diag_draw_mode)
 Set debug draw mode.
 
proto native int GetDiagDrawMode ()
 Gets current debug draw mode.
 
proto native bool IsPhysicsExtrapolationEnabled ()
 If physics extrapolation is enabled, always true on retail release builds.
 
proto native float GetFps ()
 Returns average FPS of last 16 frames.
 
proto native float GetTickTime ()
 Returns current time from start of the game.
 
proto void GetInventoryItemSize (InventoryItem item, out int width, out int height)
 
proto native void GetObjectsAtPosition (vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
 Returns list of all objects in circle "radius" around position "pos".
 
proto native void GetObjectsAtPosition3D (vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
 Returns list of all objects in sphere "radius" around position "pos".
 
proto native World GetWorld ()
 
proto void GetWorldName (out string world_name)
 
string GetWorldName ()
 
proto native bool VerifyWorldOwnership (string sWorldName)
 
proto native bool GoBuyWorldDLC (string sWorldName)
 
proto void FormatString (string format, string params[], out string output)
 
proto void GetVersion (out string version)
 
proto native UIManager GetUIManager ()
 
proto native DayZPlayer GetPlayer ()
 
proto native void GetPlayers (out array< Man > players)
 
DayZPlayer GetPlayerByIndex (int index=0)
 
proto native void StoreLoginData (ParamsWriteContext ctx)
 Stores login userdata as parameters which are sent to server.
 
proto native vector GetPointerDirection ()
 Returns the direction where the mouse points, from the camera view.
 
proto native vector GetWorldDirectionFromScreen (vector world_pos)
 Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos.
 
proto native vector GetScreenPos (vector world_pos)
 Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos.
 
proto native vector GetScreenPosRelative (vector world_pos)
 Transforms position in world to position in screen in percentage (0.0 - 1.0) as x, y component of vector, z parameter represents distance between camera and world_pos.
 
proto native MenuData GetMenuData ()
 Return singleton of MenuData class - at main menu contains characters played with current profile.
 
proto native void RPC (Object target, int rpcType, notnull array< ref Param > params, bool guaranteed, PlayerIdentity recipient=null)
 Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on server, RPC is executed on all clients.
 
void RPCSingleParam (Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
 see CGame.RPC
 
proto native void RPCSelf (Object target, int rpcType, notnull array< ref Param > params)
 Not actually an RPC, as it will send it only to yourself.
 
void RPCSelfSingleParam (Object target, int rpcType, Param param)
 
proto native void ProfilerStart (string name)
 Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler.
 
proto native void ProfilerStop (string name)
 Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler.
 
proto native void Chat (string text, string colorClass)
 Prints text into game chat.
 
proto native void ChatMP (Man recipient, string text, string colorClass)
 
proto native void ChatPlayer (string text)
 
proto native void MutePlayer (string muteUID, string playerUID, bool mute)
 Mutes voice of source player to target player.
 
proto native void MuteAllPlayers (string listenerId, bool mute)
 Mute all players for listenerId.
 
proto native void EnableVoN (Object player, bool enable)
 Enable/disable VoN for target player.
 
proto native void SetVoiceEffect (Object player, int effect, bool enable)
 Enable/disable VoN effect (only on server)
 
proto native void SetVoiceLevel (int level)
 Set voice level of VoN (only on client) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)
 
proto native int GetVoiceLevel (Object player=null)
 Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)
 
proto native void EnableMicCapture (bool enable)
 Enable microphone to locally capture audio from user. Audio heard does NOT automatically get transmitted over network.
 
proto native bool IsMicCapturing ()
 Returns whether mic is currently capturing audio from user.
 
proto native bool IsInPartyChat ()
 Returns whether user is currently in a voice party (currently only supported on xbox)
 
proto native Mission GetMission ()
 
proto native void SetMission (Mission mission)
 
proto native void StartRandomCutscene (string world)
 Starts intro.
 
proto native void PlayMission (string path)
 Starts mission (equivalent for SQF playMission). You MUST use double slash \.
 

Static Private Member Functions

static bool ReportModded ()
 

Private Attributes

const int STATS_COUNT = EConnectivityStatType.COUNT
 
EConnectivityStatLevel m_ConnectivityStatsStates [STATS_COUNT]
 
int m_MissionState
 
ref LoginTimeBase m_LoginTimeScreen
 
ref LoginQueueBase m_LoginQueue
 
int m_LoginTime
 
ref ConnectionLost m_connectionLost
 
ref TimerQueue m_timerQueue [CALL_CATEGORY_COUNT]
 
ref ScriptCallQueue m_callQueue [CALL_CATEGORY_COUNT]
 
ref ScriptInvoker m_updateQueue [CALL_CATEGORY_COUNT]
 
ref ScriptInvoker m_postUpdateQueue [CALL_CATEGORY_COUNT]
 
ref DragQueue m_dragQueue
 
ref DayZProfilesOptions m_DayZProfileOptions
 
bool m_early_access_dialog_accepted
 
UIScriptedMenu m_keyboard_handler
 
ScriptModule m_mission_module
 
string m_MissionPath
 
string m_MissionFolderPath
 
bool m_IsCtrlHolding
 
bool m_IsWinHolding
 
bool m_IsLeftAltHolding
 
bool m_IsRightAltHolding
 
bool m_IsWorldWetTempUpdateEnabled = true
 
bool m_IsFoodDecayEnabled = true
 
float m_FoodDecayModifier
 
bool m_IsStressTest
 
bool m_AimLoggingEnabled
 
int m_OriginalCharactersCount
 
string m_PlayerName
 
bool m_IsNewCharacter
 
bool m_IsConnecting
 
bool m_ConnectFromJoin
 
bool m_ShouldShowControllerDisconnect
 
bool m_CursorDesiredVisibilityScript = true
 
int m_PreviousGamepad
 
float m_UserFOV
 
float m_DeltaTime
 
float m_volume_sound
 
float m_volume_speechEX
 
float m_volume_music
 
float m_volume_VOIP
 
float m_volume_radio
 
float m_PreviousEVValue
 
float m_EVValue = 0
 
ref Backlit m_Backlit
 
ref array< stringm_CharClassNames = new array<string>()
 
ref array< intm_ConnectedInputDeviceList
 
ref EffectSound m_CrashSound
 
ref EffectSound m_ArtySound
 
const int MIN_ARTY_SOUND_RANGE = 300
 
int m_DebugMonitorEnabled
 
ScriptModule GameScript
 
ref array< ref Paramm_ParamCache
 
ref AnalyticsManagerServer m_AnalyticsManagerServer
 
ref AnalyticsManagerClient m_AnalyticsManagerClient
 
ref MenuDefaultCharacterData m_CharacterData
 

Static Private Attributes

static bool m_ReportModded
 
static ref AmmoCamParams m_AmmoShakeParams = new AmmoCamParams()
 
static ref ScriptInvoker Event_OnRPC = new ScriptInvoker()
 
static ref NoiseParams m_NoiseParams = new NoiseParams()
 

Detailed Description

Definition at line 849 of file DayZGame.c.

Constructor & Destructor Documentation

◆ ~DayZGame()

void CGame::~DayZGame ( )
inlineprivate

Definition at line 1027 of file DayZGame.c.

1028 {
1032
1033 g_Game = null;
1035 Print("~DayZGame()");
1036 }
DayZGame g_Game
Definition DayZGame.c:3528
void SetDispatcher(Dispatcher dispatcher)
Definition Dispatcher.c:31
Static data of bleeding chance probabilities; currently used for melee only.
static void Cleanup()
static void CleanupInstance()
Static component of PPE manager, used to hold the instance.
Definition PPEManager.c:3
static void DestroyManagerStatic()
Definition PPEManager.c:17
proto void Print(void var)
Prints content of variable to console/log.

References BleedChanceData::Cleanup(), NotificationSystem::CleanupInstance(), PPEManagerStatic::DestroyManagerStatic(), g_Game, Print(), and SetDispatcher().

◆ CGame()

void CGame::CGame ( )
inlineprivate

Definition at line 33 of file Game.c.

34 {
35 Math.Randomize(-1);
36
39 m_ParamCache.Insert(null);
40
41 //analytics
44
45 //m_CharacterData = new MenuCharacrerData;
46
47 // actual script version - increase by one when you make changes
49
50#ifdef DIAG_DEVELOPER
52#endif
53
54 if (!IsDedicatedServer())
55 {
59 }
60 }
static int GAME_STORAGE_VERSION
Definition Game.c:5
Static data holder for certain ammo config values.
Definition AmmoEffects.c:6
static void Init()
Initialize the containers: this is done this way, to have these not exist on server.
ref array< ref Param > m_ParamCache
Definition Game.c:14
proto native void StorageVersion(int iVersion)
Set actual storage version - for next save.
proto native bool IsDedicatedServer()
Robust check which is preferred than the above, as it is valid much sooner.
ref AnalyticsManagerServer m_AnalyticsManagerServer
Definition Game.c:17
ref AnalyticsManagerClient m_AnalyticsManagerClient
Definition Game.c:18
static void Init()
Definition Debug.c:689
Definition EnMath.c:7
Manager class for managing Effect (EffectParticle, EffectSound)
static void Init()
Initialize the containers.
Manager class which handles Voice-over-network functionality while player is connected to a server.
Definition VONManager.c:242
static void Init()
Initializes VONManager, runs when user first connects to a server.
Definition VONManager.c:257
static proto int Randomize(int seed)
Sets the seed for the random number generator.

References GAME_STORAGE_VERSION, AmmoEffects::Init(), SEffectManager::Init(), LogManager::Init(), VONManager::Init(), IsDedicatedServer(), m_AnalyticsManagerClient, m_AnalyticsManagerServer, m_ParamCache, Math::Randomize(), and StorageVersion().

◆ ~CGame()

void CGame::~CGame ( )
inlineprivate

Definition at line 62 of file Game.c.

63 {
64 // Clean these up even if it is dedicated server, just to be safe
68
69 // Is initialized in StartupEvent
70 ParticleManager.CleanupInstance();
71 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
static void Cleanup()
Clean up the data.
static void Cleanup()
Cleanup method to properly clean up the static data.
static void CleanupInstance()
Uninitializes VONManager, runs when user disconnects from server.
Definition VONManager.c:266

References AmmoEffects::Cleanup(), SEffectManager::Cleanup(), VONManager::CleanupInstance(), and ParticleManager().

Member Function Documentation

◆ AbortMission()

proto native void CGame::AbortMission ( )
protected

Returns to main menu, leave world empty for using last mission world.

Referenced by OnEvent().

◆ AddActionJuncture()

proto native bool CGame::AddActionJuncture ( Man player,
notnull EntityAI item,
int timeout_ms )
private

◆ AddInventoryJuncture()

proto native bool CGame::AddInventoryJuncture ( Man player,
notnull EntityAI item,
InventoryLocation dst,
bool test_dst_occupancy,
int timeout_ms )
private

Referenced by AddInventoryJunctureEx().

◆ AddInventoryJunctureEx()

bool CGame::AddInventoryJunctureEx ( Man player,
notnull EntityAI item,
InventoryLocation dst,
bool test_dst_occupancy,
int timeout_ms )
inlineprivate

Definition at line 717 of file Game.c.

718 {
720#ifdef DEVELOPER
722 Debug.InventoryReservationLog("STS = " + player.GetSimulationTimeStamp() + " result: " + result + " item:" + item + " dst: " + InventoryLocation.DumpToStringNullSafe(dst), "n/a", "n/a", "AddInventoryJuncture", player.ToString());
723#endif
724 //Print("Juncture - STS = " + player.GetSimulationTimeStamp() + " item:" + item + " dst: " + InventoryLocation.DumpToStringNullSafe(dst));
725 return result;
726 }
proto native bool AddInventoryJuncture(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms)
Definition Debug.c:14
static void InventoryReservationLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:173
InventoryLocation.
static string DumpToStringNullSafe(InventoryLocation loc)
static bool IsInventoryReservationLogEnable()
Definition Debug.c:739

References AddInventoryJuncture(), InventoryLocation::DumpToStringNullSafe(), Debug::InventoryReservationLog(), and LogManager::IsInventoryReservationLogEnable().

◆ AddPPMask()

proto native void CGame::AddPPMask ( float ndcX,
float ndcY,
float ndcRadius,
float ndcBlur )
protected

◆ AddToReconnectCache()

proto native void CGame::AddToReconnectCache ( PlayerIdentity identity)
private

Add player to reconnect cache to be able to rejoin character still existing in the world.

Note
Works only on server and no database requests are sent
Parameters
identityof player

◆ AddVisitedServer()

void CGame::AddVisitedServer ( string ip,
int port )
inlineprotected

Definition at line 2410 of file DayZGame.c.

2411 {
2412 string uid = ip + ":" + port;
2413 if (m_Visited)
2414 {
2415 int pos = m_Visited.Find(uid);
2416
2417 if (pos < 0)
2418 {
2419 if (m_Visited.Count() == MAX_VISITED)
2420 m_Visited.Remove(0);
2421 m_Visited.Insert(uid);
2422 }
2423 else
2424 {
2425 // if item is not saved as last server, move it
2426 if (pos != (m_Visited.Count() - 1))
2427 {
2428 m_Visited.Remove(pos);
2429 m_Visited.Insert(uid);
2430 }
2431 }
2432 SetProfileStringList("SB_Visited", m_Visited);
2433 SaveProfile();
2434 }
2435 }
ref TStringArray m_Visited
Definition DayZGame.c:1975
const int MAX_VISITED
Definition DayZGame.c:1974
proto native void SaveProfile()
Saves profile on disk.
proto native void SetProfileStringList(string name, TStringArray values)
Sets array of strings to profile variable.

References SaveProfile(), and SetProfileStringList().

Referenced by OnEvent().

◆ AddVoiceNotification()

void CGame::AddVoiceNotification ( VONStopSpeakingEventParams vonStartParams)
inlineprotected

Definition at line 1684 of file DayZGame.c.

1685 {
1686 m_Notifications.AddVoiceNotification(vonStartParams.param2, vonStartParams.param1);
1687 }
ref NotificationUI m_Notifications
Definition DayZGame.c:865

◆ AdminLog()

proto native void CGame::AdminLog ( string text)
private

◆ BeginOptionsVideo()

proto native void CGame::BeginOptionsVideo ( )
private

◆ CancelLoginQueue()

void CGame::CancelLoginQueue ( )
inlineprivate

Definition at line 1321 of file DayZGame.c.

1322 {
1323 if (m_LoginQueue)
1324 {
1325 if (m_LoginQueue.IsStatic())
1326 {
1327 m_LoginQueue.Hide();
1328 delete m_LoginQueue;
1329 }
1330 else
1331 m_LoginQueue.Close();
1332 }
1333 }
ref LoginQueueBase m_LoginQueue
Definition DayZGame.c:871

References m_LoginQueue.

Referenced by OnEvent(), and OnLoginTimeEvent().

◆ CancelLoginTimeCountdown()

void CGame::CancelLoginTimeCountdown ( )
inlineprivate

Definition at line 1335 of file DayZGame.c.

1336 {
1338
1340 {
1341 if (m_LoginTimeScreen.IsStatic())
1342 {
1343 m_LoginTimeScreen.Hide();
1344 delete m_LoginTimeScreen;
1345 }
1346 else
1347 m_LoginTimeScreen.Close();
1348 }
1349 }
override ScriptCallQueue GetCallQueue(int call_category)
Definition DayZGame.c:1129
void LoginTimeCountdown()
Definition DayZGame.c:1765
ref LoginTimeBase m_LoginTimeScreen
Definition DayZGame.c:870
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

References CALL_CATEGORY_SYSTEM, GetCallQueue(), and m_LoginTimeScreen.

Referenced by LoginTimeCountdown(), OnEvent(), and OnPreloadEvent().

◆ CanDisplayMouseCursor()

bool CGame::CanDisplayMouseCursor ( )
inlineprotected

extend as needed, only game focus and M&K setting (consoles only!) are checked natively

Only checking on console because while loading on PC, the mouse might not be detected

Platform defaults

Definition at line 3474 of file DayZGame.c.

3475 {
3477#ifdef PLATFORM_CONSOLE
3478 if (GetInput())
3479 return GetInput().IsMouseConnected();
3480#endif
3481
3483#ifdef PLATFORM_CONSOLE
3484 return false;
3485#else
3486 return true;
3487#endif
3488 }
proto native Input GetInput()

References GetInput().

Referenced by RefreshMouseCursorVisibility().

◆ CanRespawnPlayer()

proto native bool CGame::CanRespawnPlayer ( )
protected

◆ Chat()

proto native void CGame::Chat ( string text,
string colorClass )
private

Prints text into game chat.

Parameters
textto print
colorClass??
usage :
GetGame().Chat("Item splitted", "colorAction");
proto native CGame GetGame()

◆ ChatMP()

proto native void CGame::ChatMP ( Man recipient,
string text,
string colorClass )
private

◆ ChatPlayer()

proto native void CGame::ChatPlayer ( string text)
private

◆ CheckAmmoCompability()

static bool CGame::CheckAmmoCompability ( EntityAI weaponInHand,
EntityAI ammo )
inlinestaticprotected

Definition at line 3388 of file DayZGame.c.

3389 {
3390 TStringArray ammo_names = new TStringArray; // Array of ammo types (their name) that can be used with weapon in hand
3391
3392 string cfg_path = "CfgWeapons " + weaponInHand.GetType() + " chamberableFrom"; // Create config path
3393 GetGame().ConfigGetTextArray(cfg_path, ammo_names); // Get ammo types
3394
3395 foreach (string ammo_name : ammo_names) // for every ammo in ammo string compare passed ammo
3396 {
3397 if (ammo.GetType() == ammo_name)
3398 return true;
3399 }
3400
3401 // if no ammo from the array matches with ammo passed, return false
3402 return false;
3403 }
array< string > TStringArray
Definition EnScript.c:666

References GetGame().

◆ CheckDialogs()

void CGame::CheckDialogs ( )
inlineprotected

Definition at line 3013 of file DayZGame.c.

3014 {
3015#ifndef NO_GUI
3017 if (mission && !m_loading.IsLoading() && GetUIManager().IsDialogQueued())
3018 {
3019 mission.Pause();
3020 GetUIManager().ShowQueuedDialog();
3021 }
3022#endif
3023 }
Mission mission
proto native UIManager GetUIManager()
proto native Mission GetMission()
ref LoadingScreen m_loading
Definition DayZGame.c:869
Mission class.
Definition gameplay.c:668
void Pause()
Definition gameplay.c:748

References GetMission(), GetUIManager(), mission, and Mission::Pause().

◆ ClearConnectivityStates()

void CGame::ClearConnectivityStates ( )
inlineprivate

Definition at line 1351 of file DayZGame.c.

1352 {
1353 for (int i = 0; i < STATS_COUNT; i++)
1355 }
EConnectivityStatLevel m_ConnectivityStatsStates[STATS_COUNT]
Definition DayZGame.c:858
const int STATS_COUNT
Definition DayZGame.c:857

References STATS_COUNT.

Referenced by OnEvent().

◆ ClearJuncture()

proto native bool CGame::ClearJuncture ( Man player,
notnull EntityAI item )
private

Referenced by ClearJunctureEx().

◆ ClearJunctureEx()

bool CGame::ClearJunctureEx ( Man player,
notnull EntityAI item )
inlineprivate

Definition at line 736 of file Game.c.

737 {
738#ifdef DEVELOPER
740 Debug.InventoryReservationLog("STS = " + player.GetSimulationTimeStamp() + " item:" + item, "n/a", "n/a", "ClearJuncture", player.ToString());
741#endif
742 return ClearJuncture(player, item);
743 }
proto native bool ClearJuncture(Man player, notnull EntityAI item)

References ClearJuncture(), Debug::InventoryReservationLog(), and LogManager::IsInventoryReservationLogEnable().

◆ ClearReconnectCache()

proto native void CGame::ClearReconnectCache ( )
private

Remove all player from reconnect cache.

Note
Works only on server

◆ CloseCombatEffects()

void CGame::CloseCombatEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
bool isWater,
string ammoType )
inlineprotected

Definition at line 3271 of file DayZGame.c.

3273 {
3274#ifndef SERVER
3276 impactEffectsData.m_DirectHit = directHit;
3277 impactEffectsData.m_ComponentIndex = componentIndex;
3278 impactEffectsData.m_Surface = surface;
3279 impactEffectsData.m_Position = pos;
3280 impactEffectsData.m_ImpactType = ImpactTypes.MELEE;
3281 impactEffectsData.m_SurfaceNormal = Vector(Math.RandomFloat(-1, 1), Math.RandomFloat(-1, 1), Math.RandomFloat(-1, 1));
3282 impactEffectsData.m_ExitPosition = "0 0 0";
3283 impactEffectsData.m_InSpeed = "0 0 0";
3284 impactEffectsData.m_OutSpeed = "0 0 0";
3285 impactEffectsData.m_IsDeflected = false;
3286 impactEffectsData.m_AmmoType = ammoType;
3287 impactEffectsData.m_IsWater = isWater;
3288
3289 if (directHit)
3290 directHit.OnReceivedHit(impactEffectsData);
3291
3293#endif
3294
3295 // add hit noise
3296 if (IsServer())
3297 {
3298 m_NoiseParams.LoadFromPath("cfgAmmo " + ammoType + " NoiseHit");
3299
3301 GetNoiseSystem().AddNoisePos(EntityAI.Cast(source), pos, m_NoiseParams, surfaceCoef);
3302 }
3303 }
ImpactTypes
proto native NoiseSystem GetNoiseSystem()
static ref NoiseParams m_NoiseParams
Definition DayZGame.c:939
proto native bool IsServer()
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
static void EvaluateImpactEffectEx(ImpactEffectsData pData)
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].

References ImpactMaterials::EvaluateImpactEffectEx(), GetNoiseSystem(), IsServer(), m_NoiseParams, Math::RandomFloat(), SurfaceGetNoiseMultiplier(), and Vector().

◆ CommandlineGetParam()

proto bool CGame::CommandlineGetParam ( string name,
out string value )
private

Get command line parameter value.

Parameters
nameof parameter
valueoutput
Returns
true when parameter exists, false otherwise
usage :
// you run e.g.: DayZInt.exe -scriptDebug=true
string value;
if (GetGame().CommandlineGetParam("scriptDebug", value) && value == "true")
{
Print("Script debugging on!");
}
proto bool CommandlineGetParam(string name, out string value)
Get command line parameter value.

Referenced by DayZGame().

◆ ConfigFindClassIndex()

int CGame::ConfigFindClassIndex ( string config_path,
string searched_member )
inlineprotected

Searches given config path (config_path) for the given member (searched_member) and returns its index. \nReturns -1 if not found.
usage:

int skinning_class_index = g_Game.ConfigFindClassIndex(cfgPath_animal, "Skinning");

Definition at line 1307 of file Game.c.

1308 {
1310 for (int index = 0; index < class_count; index++)
1311 {
1312 string found_class = "";
1315 return index;
1316 }
1317 return -1;
1318 }
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.

References ConfigGetChildName(), and ConfigGetChildrenCount().

◆ ConfigGetBaseName()

proto bool CGame::ConfigGetBaseName ( string path,
out string base_name )
private

Get name of base class of config class on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
nameoutput
Returns
true on success, false if path or base is not exists

◆ ConfigGetChildName()

proto bool CGame::ConfigGetChildName ( string path,
int index,
out string name )
private

Get name of subclass in config class on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
indexof subclass in class
nameoutput
Returns
true on success, false if path or child is not found

Referenced by ConfigFindClassIndex(), and DayZGame().

◆ ConfigGetChildrenCount()

proto native int CGame::ConfigGetChildrenCount ( string path)
private

Get count of subclasses in config class on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
indexof parameter in class
nameoutput
Returns
true on success, false if path or child is not found

Referenced by ConfigFindClassIndex(), and DayZGame().

◆ ConfigGetFloat()

proto native float CGame::ConfigGetFloat ( string path)
private

Get float value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
value

Referenced by FirearmEffects().

◆ ConfigGetFloatArray()

proto native void CGame::ConfigGetFloatArray ( string path,
out TFloatArray values )
private

Get array of floats from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput

◆ ConfigGetFullPath()

proto native void CGame::ConfigGetFullPath ( string path,
out TStringArray full_path )
private

Referenced by IsKindOf().

◆ ConfigGetInt()

proto native int CGame::ConfigGetInt ( string path)
private

Get int value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
value

Referenced by DayZGame(), IsSurfaceDigable(), and IsSurfaceFertile().

◆ ConfigGetIntArray()

proto native void CGame::ConfigGetIntArray ( string path,
out TIntArray values )
private

Get array of integers from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput

◆ ConfigGetObjectFullPath()

proto native void CGame::ConfigGetObjectFullPath ( Object obj,
out TStringArray full_path )
private

Referenced by ObjectIsKindOf().

◆ ConfigGetText()

proto bool CGame::ConfigGetText ( string path,
out string value )
private

Get string value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput
Returns
true on success

Referenced by ConfigGetTextOut(), and GetModelName().

◆ ConfigGetTextArray()

proto native void CGame::ConfigGetTextArray ( string path,
out TStringArray values )
private

Get array of strings from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput
usage :
GetGame().ConfigGetTextArray("CfgMovesMaleSdr2 States menu_idleUnarmed0 variantsPlayer", characterAnimations);

◆ ConfigGetTextArrayRaw()

proto native void CGame::ConfigGetTextArrayRaw ( string path,
out TStringArray values )
private

Get array of raw strings from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput in raw format (localization keys '$STR_' are not translated)
usage :
GetGame().ConfigGetTextArrayRaw("CfgMovesMaleSdr2 States menu_idleUnarmed0 variantsPlayer", characterAnimations);
Note
use 'FormatRawConfigStringKeys' method to change localization keys to script-friendly

◆ ConfigGetTextOut()

string CGame::ConfigGetTextOut ( string path)
inlineprivate

Get string value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
value output string

Definition at line 445 of file Game.c.

446 {
447 string ret_s;
449 return ret_s;
450 }
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.

References ConfigGetText(), and path.

◆ ConfigGetTextRaw()

proto bool CGame::ConfigGetTextRaw ( string path,
out string value )
private

Get raw string value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput in raw format (localization keys '$STR_' are not translated)
Returns
true on success
Note
use 'FormatRawConfigStringKeys' method to change localization keys to script-friendly

◆ ConfigGetType()

proto native int CGame::ConfigGetType ( string path)
private

Returns type of config value.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
one of constants CT_INT, CT_FLOAT, CT_STRING, CT_ARRAY, CT_CLASS, CT_OTHER

◆ ConfigGetVector()

proto native vector CGame::ConfigGetVector ( string path)
private

Get vector value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
value

◆ ConfigIsExisting()

proto native bool CGame::ConfigIsExisting ( string path)
private

◆ ConfigPathToString()

string CGame::ConfigPathToString ( TStringArray array_path)
inlineprivate

Converts array of strings into single string.

Parameters
Arrayof strings like {"All", "AllVehicles", "Land"}
Returns
Converts given array into something lile "All AllVehicles Land".
???

Definition at line 608 of file Game.c.

609 {
610 string return_path = "";
611 int count = array_path.Count();
612
613 for (int i = 0; i < count; i++)
614 {
615 return_path += array_path.Get(i);
616
617 if (i < count - 1)
618 return_path += " ";
619 }
620
621 return return_path;
622 }

◆ Connect() [1/2]

void CGame::Connect ( )
inlineprotected

Definition at line 2456 of file DayZGame.c.

2457 {
2458 SetConnecting(true);
2459
2461 string addr;
2462 int port;
2463 if (GetHostAddress(addr, port))
2464 {
2466 return;
2467 }
2468
2471 }
void SetConnecting(bool value)
Returns true when connecting to server.
Definition DayZGame.c:3026
void DisconnectSessionScript(bool displayJoinError=false)
Definition DayZGame.c:2473
int m_ConnectPort
Definition DayZGame.c:1971
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
string m_ConnectAddress
Definition DayZGame.c:1970
void DeleteTitleScreen()
Definition DayZGame.c:2025
void Connect()
Definition DayZGame.c:2456
string m_ConnectPassword
Definition DayZGame.c:1972

References Connect(), DeleteTitleScreen(), DisconnectSessionScript(), GetHostAddress(), GetUIManager(), and SetConnecting().

Referenced by Connect(), ConnectFromCLI(), ConnectFromJoin(), and TryConnect().

◆ Connect() [2/2]

proto native int CGame::Connect ( UIScriptedMenu parent,
string IpAddress,
int port,
string password )
private

Connects to IsServer.

Parameters
IpAddressof the server
portof the server set to 0 for default port
passwordof the server
Returns
0 on success, error code from ErrorModuleHandler on not success

◆ ConnectFromCLI()

void CGame::ConnectFromCLI ( )
inlineprotected

Definition at line 2547 of file DayZGame.c.

2548 {
2549 string port;
2550 if (GetCLIParam("connect", m_ConnectAddress))
2551 {
2552 GetCLIParam("port", port);
2553 m_ConnectPort = port.ToInt();
2554
2555 GetCLIParam("password", m_ConnectPassword);
2556
2557 m_ConnectFromJoin = false;
2558 Connect();
2559 }
2560 }
bool m_ConnectFromJoin
Definition DayZGame.c:902
proto bool GetCLIParam(string param, out string val)
Returns command line argument.

References Connect(), and GetCLIParam().

Referenced by ConnectLaunch(), and TryConnect().

◆ ConnectFromJoin()

void CGame::ConnectFromJoin ( string ip,
int port )
inlineprotected

Definition at line 2539 of file DayZGame.c.

2540 {
2543 m_ConnectFromJoin = true;
2544 Connect();
2545 }

References Connect().

◆ ConnectFromServerBrowser()

void CGame::ConnectFromServerBrowser ( string ip,
int port,
string password = "" )
inlineprotected

Definition at line 2530 of file DayZGame.c.

References OnlineServices::LoadMPPrivilege().

◆ ConnectLastSession()

proto native int CGame::ConnectLastSession ( UIScriptedMenu parent,
int selectedCharacter = -1 )
private

Connects to last success network session.

Returns
0 on success, error code from ErrorModuleHandler on not success

◆ ConnectLaunch()

void CGame::ConnectLaunch ( )
inlineprotected

Definition at line 2063 of file DayZGame.c.

2064 {
2066 if (user_manager.GetTitleInitiator())
2067 user_manager.SelectUserEx(user_manager.GetTitleInitiator());
2068
2069 SetGameState(DayZGameState.CONNECT);
2070 SetLoadState(DayZLoadState.CONNECT_START);
2071
2072#ifndef PLATFORM_WINDOWS
2073#ifdef PLATFORM_CONSOLE
2075 GamepadCheck();
2076#endif
2077#else
2079#endif
2080 }
void CreateTitleScreen()
Definition DayZGame.c:1989
void ConnectFromCLI()
Definition DayZGame.c:2547
proto native BiosUserManager GetUserManager()
void SetLoadState(DayZLoadState state)
Definition DayZGame.c:1259
void GamepadCheck()
Definition DayZGame.c:2236
void SetGameState(DayZGameState state)
Definition DayZGame.c:1249

References ConnectFromCLI(), CreateTitleScreen(), GamepadCheck(), GetUserManager(), SetGameState(), and SetLoadState().

Referenced by OnInitialize().

◆ CopyFromClipboard()

proto void CGame::CopyFromClipboard ( out string text)
private

◆ CopyToClipboard()

proto native void CGame::CopyToClipboard ( string text)
private

◆ CreateDefaultPlayer() [1/2]

override string CGame::CreateDefaultPlayer ( )
inlineprotected

Definition at line 3074 of file DayZGame.c.

3075 {
3076 if (m_CharClassNames.Count() > 0)
3077 return m_CharClassNames[0];
3078
3079 return "";
3080 }
ref array< string > m_CharClassNames
Definition DayZGame.c:929

◆ CreateDefaultPlayer() [2/2]

string CGame::CreateDefaultPlayer ( )
inlineprotected

returns class name of first valid survivor (TODO address confusing naming?)

Definition at line 1356 of file Game.c.

1356{}

◆ CreateGamepadDisconnectMenu()

void CGame::CreateGamepadDisconnectMenu ( )
protected

◆ CreateMission()

native void CGame::CreateMission ( string path)
protected

Create only enforce script mission, used for mission script reloading.

Referenced by ReloadMission().

◆ CreateObject()

proto native Object CGame::CreateObject ( string type,
vector pos,
bool create_local = false,
bool init_ai = false,
bool create_physics = true )
private

Creates object of certain type.

Parameters
typeof objects to create
posposition where to create object
create_localif True, object is not spawned on clients only on server
init_aiif creating object is LightAI class, by this param is initialised AI or not
Returns
new Object

◆ CreateObjectEx()

proto native Object CGame::CreateObjectEx ( string type,
vector pos,
int iFlags,
int iRotation = RF_DEFAULT )
private

Creates object of certain type.

Parameters
typeof objects to create
posposition where to create object
iFlagsare used to setup object and/ or spawn behavior
iRotationare used to setup object rotation on spawn (or default if not specified)
Returns
new Object

Referenced by OnProjectileStopped(), OnProjectileStoppedInObject(), and OnProjectileStoppedInTerrain().

◆ CreatePlayer()

proto native Entity CGame::CreatePlayer ( PlayerIdentity identity,
string name,
vector pos,
float radius,
string spec )
private

Assign player entity to client (in multiplayer)

Note
Works only on server
Parameters
name

◆ CreateRandomPlayer() [1/2]

override string CGame::CreateRandomPlayer ( )
inlineprotected

Definition at line 3083 of file DayZGame.c.

3084 {
3085 return m_CharClassNames.GetRandomElement();
3086 }

◆ CreateRandomPlayer() [2/2]

string CGame::CreateRandomPlayer ( )
inlineprotected

returns class name of random survivor (TODO address confusing naming?)

Definition at line 1359 of file Game.c.

1359{}

◆ CreateScriptedMenu() [1/2]

override UIScriptedMenu CGame::CreateScriptedMenu ( int id)
inlineprivate

create custom main menu part (submenu)

Definition at line 1301 of file DayZGame.c.

1302 {
1303#ifndef NO_GUI
1305 if (mission)
1306 return mission.CreateScriptedMenu(id);
1307#endif
1308 return NULL;
1309 }
UIScriptedMenu CreateScriptedMenu(int id)
Definition gameplay.c:713

References Mission::CreateScriptedMenu(), GetMission(), and mission.

◆ CreateScriptedMenu() [2/2]

UIScriptedMenu CGame::CreateScriptedMenu ( int id)
inlineprivate

create custom main menu part (submenu)

Definition at line 186 of file Game.c.

186{ }

◆ CreateScriptedWindow()

UIScriptedWindow CGame::CreateScriptedWindow ( int id)
inlineprivate

create custom window part

Definition at line 191 of file Game.c.

191{ }

◆ CreateSoundOnObject()

proto native SoundOnVehicle CGame::CreateSoundOnObject ( Object source,
string sound_name,
float distance,
bool looped,
bool create_local = false )
private

◆ CreateSoundWaveOnObject()

proto native SoundWaveOnVehicle CGame::CreateSoundWaveOnObject ( Object source,
SoundObject soundObject,
AbstractWave soundWave )
private

◆ CreateStaticObjectUsingP3D()

proto native Object CGame::CreateStaticObjectUsingP3D ( string p3dFilename,
vector position,
vector orientation,
float scale = 1.0,
bool createLocal = false )
private

◆ CreateTitleScreen()

void CGame::CreateTitleScreen ( )
inlineprotected

Definition at line 1989 of file DayZGame.c.

1990 {
1992 m_IntroMenu = GetWorkspace().CreateWidgets("gui/layouts/xbox/day_z_title_screen.layout");
1993 RichTextWidget text_widget = RichTextWidget.Cast(m_IntroMenu.FindAnyWidget("InputPromptText"));
1994 m_IntroMenu.FindAnyWidget("notification_root").Show(false);
1995 if (text_widget)
1996 {
1997 string text = Widget.TranslateString("#console_start_game");
1998#ifdef PLATFORM_XBOX
1999 BiosUserManager user_manager = GetGame().GetUserManager();
2000 if (user_manager && user_manager.GetSelectedUser())
2001 text_widget.SetText(string.Format(text, "<image set=\"xbox_buttons\" name=\"A\" />"));
2002 else
2003 text_widget.SetText(string.Format(text, "<image set=\"xbox_buttons\" name=\"A\" />"));
2004#endif
2005
2006#ifdef PLATFORM_PS4
2007 string confirm = "cross";
2008 if (GetGame().GetInput().GetEnterButton() == GamepadButton.A)
2009 confirm = "cross";
2010 else
2011 confirm = "circle";
2012 text_widget.SetText(string.Format(text, "<image set=\"playstation_buttons\" name=\"" + confirm + "\" />"));
2013#endif
2014 }
2015
2016#ifdef PLATFORM_CONSOLE
2017#ifdef PLATFORM_XBOX
2018#ifdef BUILD_EXPERIMENTAL
2019 m_IntroMenu.FindAnyWidget("notification_root").Show(true);
2020#endif
2021#endif
2022#endif
2023 }
ref Widget m_IntroMenu
Definition DayZGame.c:1964
proto native WorkspaceWidget GetWorkspace()
GamepadButton
Definition EnSystem.c:341

References DeleteTitleScreen(), GetGame(), GetInput(), and GetWorkspace().

Referenced by ConnectLaunch(), GamepadCheck(), MissionLaunch(), and OnInitialize().

◆ DayZGame()

void CGame::DayZGame ( )
inlineprivate

Definition at line 947 of file DayZGame.c.

948 {
950
951#ifdef PLATFORM_CONSOLE
952 SetMainMenuWorld("MainMenuSceneXbox");
953#endif
955
957
958#ifdef DEVELOPER
960#endif
961
962 for (int i = 0; i < CALL_CATEGORY_COUNT; i++)
963 {
966 m_timerQueue[i] = new TimerQueue();
967
969 }
970
971 m_dragQueue = new DragQueue;
972
973 m_LoginTime = 0;
974
975 string tmp;
976 if (CommandlineGetParam("stresstest", tmp))
977 m_IsStressTest = true;
978
979 if (CommandlineGetParam("doAimLogs", tmp))
980 m_AimLoggingEnabled = true;
981
982 // initialize backlit effects
983 m_Backlit = new Backlit();
984 m_Backlit.OnInit(this);
985
987
988#ifndef NO_GUI
989 if (m_loading == null)
990 m_loading = new LoadingScreen(this);
991
992 if (m_loading)
993 m_loading.ShowEx(this);
994
996#endif
997
998 Debug.Init();
999 Component.Init();
1003 GetUApi().PresetSelect(GetUApi().PresetCurrent());
1004
1006
1009
1010 string path = "cfgVehicles";
1011 string child_name = "";
1013
1014 for (int p = 0; p < count; ++p)
1015 {
1017
1018 if (ConfigGetInt(path + " " + child_name + " scope") == 2 && IsKindOf(child_name, "SurvivorBase"))
1020 }
1021
1022 m_IsConnecting = false;
1023 m_ConnectFromJoin = false;
1024 }
void LoadingScreen(DayZGame game)
Definition DayZGame.c:677
proto native UAInputAPI GetUApi()
Backlit effect class.
Definition Backlit.c:105
static void InitBleedChanceData()
ref TimerQueue m_timerQueue[CALL_CATEGORY_COUNT]
Definition DayZGame.c:875
int m_MissionState
Definition DayZGame.c:860
ref DayZProfilesOptions m_DayZProfileOptions
Definition DayZGame.c:880
bool IsKindOf(string cfg_class_name, string cfg_parent_name)
Returns is class name inherited from parent class name.
Definition Game.c:1239
ref ScriptInvoker m_postUpdateQueue[CALL_CATEGORY_COUNT]
Definition DayZGame.c:878
void GlobalsInit()
Definition DayZGame.c:1059
bool m_early_access_dialog_accepted
Definition DayZGame.c:881
bool m_IsStressTest
Definition DayZGame.c:896
proto native bool GetModToBeReported()
proto native void SetMainMenuWorld(string world)
bool m_IsConnecting
Definition DayZGame.c:901
static bool m_ReportModded
Definition DayZGame.c:895
ref ScriptCallQueue m_callQueue[CALL_CATEGORY_COUNT]
Definition DayZGame.c:876
proto native int ConfigGetInt(string path)
Get int value from config on path.
ref Backlit m_Backlit
Definition DayZGame.c:927
const int MISSION_STATE_GAME
Definition DayZGame.c:854
ref ScriptInvoker m_updateQueue[CALL_CATEGORY_COUNT]
Definition DayZGame.c:877
UIScriptedMenu m_keyboard_handler
Definition DayZGame.c:882
void RefreshMouseCursorVisibility()
Definition DayZGame.c:3490
int m_LoginTime
Definition DayZGame.c:872
ref DragQueue m_dragQueue
Definition DayZGame.c:879
void DeferredInit()
Definition DayZGame.c:1039
bool m_AimLoggingEnabled
Definition DayZGame.c:897
static void Init()
Definition Component.c:37
static void Init()
Definition Debug.c:91
static void CreateManagerStatic()
Definition PPEManager.c:6
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
Definition tools.c:53
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10
const int CALL_CATEGORY_GUI
Definition tools.c:9
const int CALL_CATEGORY_COUNT
Definition tools.c:12

References CALL_CATEGORY_COUNT, CALL_CATEGORY_GAMEPLAY, CALL_CATEGORY_GUI, CommandlineGetParam(), ConfigGetChildName(), ConfigGetChildrenCount(), ConfigGetInt(), PPEManagerStatic::CreateManagerStatic(), GetCallQueue(), GetModToBeReported(), GetUApi(), Component::Init(), Debug::Init(), CachedObjectsParams::Init(), CachedObjectsArrays::Init(), BleedChanceData::InitBleedChanceData(), IsKindOf(), LoadingScreen(), m_timerQueue, MISSION_STATE_GAME, path, RefreshMouseCursorVisibility(), and SetMainMenuWorld().

Referenced by IsMissionMainMenu().

◆ DeferredInit()

void CGame::DeferredInit ( )
inlineprivate

Definition at line 1039 of file DayZGame.c.

1040 {
1041 GameOptions opt = new GameOptions();
1042 opt.Initialize();
1043
1044 GetInput().UpdateConnectedInputDeviceList();
1045
1047
1048 m_volume_sound = GetSoundScene().GetSoundVolume();
1049 m_volume_speechEX = GetSoundScene().GetSpeechExVolume();
1050 m_volume_music = GetSoundScene().GetMusicVolume();
1051 m_volume_VOIP = GetSoundScene().GetVOIPVolume();
1052 m_volume_radio = GetSoundScene().GetRadioVolume();
1053
1056 }
float m_volume_music
Definition DayZGame.c:912
float m_volume_VOIP
Definition DayZGame.c:913
float m_volume_radio
Definition DayZGame.c:914
proto native AbstractSoundScene GetSoundScene()
static float GetUserFOVFromConfig()
Definition DayZGame.c:3351
float m_volume_sound
Definition DayZGame.c:910
float m_volume_speechEX
Definition DayZGame.c:911
float m_UserFOV
Definition DayZGame.c:906
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
Definition Game.c:1379
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Definition PPEManager.c:27

References GetInput(), GetMenuDefaultCharacterData(), PPEManagerStatic::GetPPEManager(), GetSoundScene(), and GetUserFOVFromConfig().

◆ DelayedMidAirDetonation()

void CGame::DelayedMidAirDetonation ( float x,
float y,
float z )
inlineprotected

Definition at line 3006 of file DayZGame.c.

3007 {
3008 EffectSound artilleryFallSound = SEffectManager.PlaySound("Artillery_Fall_SoundSet", Vector(x, y, z));
3009 artilleryFallSound.SetAutodestroy(true);
3010 }
Icon x
Icon y
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.

References SEffectManager::PlaySound(), Vector(), x, and y.

◆ DeleteGamepadDisconnectMenu()

void CGame::DeleteGamepadDisconnectMenu ( )
protected

◆ DeleteTitleScreen()

void CGame::DeleteTitleScreen ( )
inlineprotected

Definition at line 2025 of file DayZGame.c.

2026 {
2027 if (m_IntroMenu)
2028 delete m_IntroMenu;
2029 }

References m_IntroMenu.

Referenced by Connect(), CreateTitleScreen(), GamepadCheck(), MainMenuLaunch(), and SelectGamepad().

◆ DisconnectPlayer()

proto native void CGame::DisconnectPlayer ( PlayerIdentity identity,
string uid = "" )
private

Destroy player info and disconnect.

Note
Works only on server

◆ DisconnectSession()

proto native void CGame::DisconnectSession ( )
private

Disconnects from current multiplayer session.

◆ DisconnectSessionEx()

void CGame::DisconnectSessionEx ( DisconnectSessionFlags flags)
inlineprotected

Definition at line 2485 of file DayZGame.c.

2486 {
2487 if (flags & DisconnectSessionFlags.SELECT_USER && OnlineServices.GetBiosUser())
2488 GetGame().GetUserManager().SelectUserEx(OnlineServices.GetBiosUser());
2489
2490 if (flags & DisconnectSessionFlags.JOIN_ERROR_ENABLED)
2491 {
2492 if (!(flags & DisconnectSessionFlags.JOIN_ERROR_CHECK) || GetGameState() == DayZGameState.JOIN)
2494 }
2495
2496 if (flags & DisconnectSessionFlags.IGNORE_WHEN_IN_GAME && GetGameState() == DayZGameState.IN_GAME)
2497 return;
2498
2499 if (flags & DisconnectSessionFlags.CLOSE_MENUS && GetGame().GetUIManager())
2500 {
2501 GetGame().GetUIManager().CloseAllSubmenus();
2502
2503 if (GetGame().GetUIManager().IsDialogVisible())
2504 GetGame().GetUIManager().CloseDialog();
2505 }
2506
2507 if (flags & DisconnectSessionFlags.ALWAYS_FORCE)
2509
2510 if (GetGame().GetMission())
2511 {
2512 if (g_Game.GetGameState() != DayZGameState.MAIN_MENU)
2513 {
2514 if (flags & DisconnectSessionFlags.DISCONNECT_ERROR_ENABLED)
2516
2517 GetGame().GetMission().AbortMission();
2518
2519 SetGameState(DayZGameState.MAIN_MENU);
2520 SetLoadState(DayZLoadState.MAIN_MENU_CONTROLLER_SELECT);
2521
2522 GamepadCheck();
2523 }
2524 }
2525
2526 else
2528 }
DisconnectSessionFlags
Definition DayZGame.c:2
NotificationType
DEPRECATED (moved into NotificationSystem)
DayZGameState GetGameState()
Definition DayZGame.c:1254
void MainMenuLaunch()
Definition DayZGame.c:2096
proto native void DisconnectSessionForce()
Forces disconnect from current multiplayer session even if not yet in the game.
static void AddNotification(NotificationType type, float show_time, string detail_text="")
Send notification from default types to local player.
static BiosUser GetBiosUser()

References NotificationSystem::AddNotification(), NotificationSystem::DEFAULT_TIME_DISPLAYED, DisconnectSessionForce(), g_Game, GamepadCheck(), OnlineServices::GetBiosUser(), GetGame(), GetMission(), GetUIManager(), MainMenuLaunch(), SetGameState(), and SetLoadState().

Referenced by DisconnectSessionScript().

◆ DisconnectSessionForce()

proto native void CGame::DisconnectSessionForce ( )
private

Forces disconnect from current multiplayer session even if not yet in the game.

Referenced by DisconnectSessionEx(), and TryConnect().

◆ DisconnectSessionScript()

void CGame::DisconnectSessionScript ( bool displayJoinError = false)
inlineprotected

Definition at line 2473 of file DayZGame.c.

2474 {
2475 DisconnectSessionFlags flags = DisconnectSessionFlags.SELECT_USER | DisconnectSessionFlags.IGNORE_WHEN_IN_GAME;
2476 if (displayJoinError)
2477 {
2478 flags |= DisconnectSessionFlags.JOIN_ERROR_ENABLED;
2479 flags |= DisconnectSessionFlags.JOIN_ERROR_CHECK;
2480 }
2481
2482 DisconnectSessionEx(flags);
2483 }
void DisconnectSessionEx(DisconnectSessionFlags flags)
Definition DayZGame.c:2485

References DisconnectSessionEx().

Referenced by Connect(), and TryConnect().

◆ DumpInstances()

proto native void CGame::DumpInstances ( bool csvFormatting)
private

Delevoper only: Dump all script allocations.

◆ EarlyAccessDialog()

void CGame::EarlyAccessDialog ( UIScriptedMenu parent)
inlineprivate

Definition at line 1290 of file DayZGame.c.

1291 {
1293 {
1294 g_Game.GetUIManager().EnterScriptedMenu(MENU_EARLYACCESS, parent);
1296 }
1297 }
const int MENU_EARLYACCESS
Definition constants.c:166

References g_Game, and MENU_EARLYACCESS.

◆ EnableMicCapture()

proto native void CGame::EnableMicCapture ( bool enable)
private

Enable microphone to locally capture audio from user. Audio heard does NOT automatically get transmitted over network.

Parameters
enableenables or disabled listening

◆ EnableVoN()

proto native void CGame::EnableVoN ( Object player,
bool enable )
private

Enable/disable VoN for target player.

Parameters
playerin question
enablesets if player can use VoN

◆ EndOptionsVideo()

proto native void CGame::EndOptionsVideo ( )
private

◆ EnterLoginQueue()

void CGame::EnterLoginQueue ( UIMenuPanel parent)
inlineprotected

Definition at line 1832 of file DayZGame.c.

1833 {
1834 m_LoginQueue = LoginQueueBase.Cast(GetUIManager().EnterScriptedMenu(MENU_LOGIN_QUEUE, parent));
1835 }
LoginQueue position when using -connect since mission is not created yet.
Definition DayZGame.c:186
const int MENU_LOGIN_QUEUE
Definition constants.c:189

References GetUIManager(), and MENU_LOGIN_QUEUE.

Referenced by UpdateLoginQueue().

◆ EnterLoginTime()

void CGame::EnterLoginTime ( UIMenuPanel parent)
inlineprotected

Definition at line 1838 of file DayZGame.c.

1839 {
1840 m_LoginTimeScreen = LoginTimeBase.Cast(GetUIManager().EnterScriptedMenu(MENU_LOGIN_TIME, parent));
1841 }
LoginTime when using -connect since mission is not created yet.
Definition DayZGame.c:320
const int MENU_LOGIN_TIME
Definition constants.c:197

References GetUIManager(), and MENU_LOGIN_TIME.

Referenced by OnLoginTimeEvent(), and OnRespawnEvent().

◆ ExecuteEnforceScript()

proto native bool CGame::ExecuteEnforceScript ( string expression,
string mainFnName )
private

Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script console.

◆ ExplosionEffects()

void CGame::ExplosionEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
float energyFactor,
float explosionFactor,
bool isWater,
string ammoType )
inlineprotected

Definition at line 3114 of file DayZGame.c.

3116 {
3117#ifndef SERVER
3118 if (source)
3119 {
3121
3122 if (source.ShootsExplosiveAmmo() && ammoType == "Explosion_40mm_Ammo")
3123 ParticleManager.GetInstance().PlayInWorld(ParticleList.EXPLOSION_LANDMINE, pos);
3124
3127
3129 {
3131 float modifier = Math.Lerp(m_AmmoShakeParams.m_ModifierClose, m_AmmoShakeParams.m_ModifierFar, dist01);
3132
3133 GetGame().GetPlayer().GetCurrentCamera().SpawnCameraShake(modifier * m_AmmoShakeParams.m_Strength);
3134 }
3135 }
3136#endif
3137 }
class JsonUndergroundAreaTriggerData GetPosition
proto native DayZPlayer GetPlayer()
static ref AmmoCamParams m_AmmoShakeParams
Definition DayZGame.c:923
static const int EXPLOSION_LANDMINE
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

References vector::Distance(), ParticleList::EXPLOSION_LANDMINE, GetGame(), GetPlayer(), GetPosition, Math::InverseLerp(), Math::Lerp(), and ParticleManager().

Referenced by ExplosionEffectsEx().

◆ ExplosionEffectsEx()

void CGame::ExplosionEffectsEx ( Object source,
Object directHit,
int componentIndex,
float energyFactor,
float explosionFactor,
HitInfo hitInfo )
inlineprotected

Definition at line 3095 of file DayZGame.c.

3096 {
3097 vector pos = hitInfo.GetPosition();
3098 string ammoType = hitInfo.GetAmmoType();
3099
3100 // Call legacy method
3101 ExplosionEffects(source, directHit, componentIndex, hitInfo.GetSurface(), pos, hitInfo.GetSurfaceNormal(), energyFactor, explosionFactor, hitInfo.IsWater(), ammoType);
3102
3103 // add explosion noise
3104 if (IsServer())
3105 {
3106 //NoiseParams npar = new NoiseParams();
3107 m_NoiseParams.LoadFromPath(string.Format("cfgAmmo %1 NoiseExplosion", ammoType));
3108
3109 GetNoiseSystem().AddNoiseTarget(pos, 21, m_NoiseParams, hitInfo.GetSurfaceNoiseMultiplier());
3110 }
3111 }
void ExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
Definition DayZGame.c:3114

References ExplosionEffects(), GetNoiseSystem(), IsServer(), and m_NoiseParams.

◆ ExtendActionJuncture()

proto native bool CGame::ExtendActionJuncture ( Man player,
notnull EntityAI item,
int timeout_ms )
private

◆ FirearmEffects()

void CGame::FirearmEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
vector exitPos,
vector inSpeed,
vector outSpeed,
bool isWater,
bool deflected,
string ammoType )
inlineprotected

Definition at line 3226 of file DayZGame.c.

3228 {
3229#ifndef SERVER
3231 impactEffectsData.m_DirectHit = directHit;
3232 impactEffectsData.m_ComponentIndex = componentIndex;
3233 impactEffectsData.m_Surface = surface;
3234 impactEffectsData.m_Position = pos;
3235 impactEffectsData.m_ImpactType = ImpactTypes.UNKNOWN;
3236 impactEffectsData.m_SurfaceNormal = surfNormal;
3237 impactEffectsData.m_ExitPosition = exitPos;
3238 impactEffectsData.m_InSpeed = inSpeed;
3239 impactEffectsData.m_OutSpeed = outSpeed;
3240 impactEffectsData.m_IsDeflected = deflected;
3241 impactEffectsData.m_AmmoType = ammoType;
3242 impactEffectsData.m_IsWater = isWater;
3243
3244 if (directHit)
3245 directHit.OnReceivedHit(impactEffectsData);
3246
3248#endif
3249
3250
3251 if (IsServer())
3252 {
3253 if (source && source.ShootsExplosiveAmmo() && !deflected && outSpeed == vector.Zero)
3254 {
3255 if (ammoType == "Bullet_40mm_ChemGas")
3256 GetGame().CreateObject("ContaminatedArea_Local", pos);
3257 else if (ammoType == "Bullet_40mm_Explosive")
3258 DamageSystem.ExplosionDamage(EntityAI.Cast(source), null, "Explosion_40mm_Ammo", pos, DamageType.EXPLOSION);
3259 }
3260
3261 // add hit noise
3262 m_NoiseParams.LoadFromPath("cfgAmmo " + ammoType + " NoiseHit");
3263
3265 float coefAdjusted = surfaceCoef * inSpeed.Length() / ConfigGetFloat("cfgAmmo " + ammoType + " initSpeed");
3266 GetNoiseSystem().AddNoiseTarget(pos, 10, m_NoiseParams, coefAdjusted); // Leave a ping for 5 seconds
3267 }
3268 }
DamageType
exposed from C++ (do not change)
proto native float ConfigGetFloat(string path)
Get float value from config on path.
static const vector Zero
Definition EnConvert.c:110

References ConfigGetFloat(), ImpactMaterials::EvaluateImpactEffectEx(), GetGame(), GetNoiseSystem(), IsServer(), m_NoiseParams, SurfaceGetNoiseMultiplier(), and vector::Zero.

◆ FormatRawConfigStringKeys()

bool CGame::FormatRawConfigStringKeys ( inout string value)
inlineprivate

Changes localization key format to script-friendly format.

Parameters
originalconfig string.
Returns
value output string with '$' substituted to script-friendly '#'. If not found, does nothing.

Definition at line 457 of file Game.c.

458 {
459 int ret;
460 ret = value.Replace("$STR_", "#STR_");
461 return ret > 0;
462 }

◆ FormatString()

proto void CGame::FormatString ( string format,
string params[],
out string output )
private

◆ GamepadCheck()

void CGame::GamepadCheck ( )
inlineprotected

Definition at line 2236 of file DayZGame.c.

2237 {
2238#ifndef AUTOTEST
2239 if (GetInput().IsActiveGamepadSelected())
2240 {
2241#endif
2243 SelectUser();
2244#ifndef AUTOTEST
2245 }
2246 else
2247 {
2248#ifdef PLATFORM_CONSOLE
2249#ifndef PLATFORM_WINDOWS
2250#ifdef PLATFORM_PS4
2251 if (GetUserManager().GetSelectedUser())
2252 {
2253 int gamepad = GetInput().GetUserGamepad(GetUserManager().GetSelectedUser());
2254 if (gamepad > -1)
2256 else
2257 {
2258 if (!m_IntroMenu && !(GetGame().GetUIManager().GetMenu() && GetGame().GetUIManager().GetMenu().GetID() == MENU_TITLE_SCREEN))
2260 GetGame().GetInput().IdentifyGamepad(GetGame().GetInput().GetEnterButton());
2261 }
2262 }
2263 else
2264#endif
2265 {
2266 if (!m_IntroMenu && !(GetUIManager().GetMenu() && GetUIManager().GetMenu().GetID() == MENU_TITLE_SCREEN))
2268 GetInput().IdentifyGamepad(GetInput().GetEnterButton());
2269 }
2270#endif
2271#endif
2272 }
2273#endif
2274 }
int GetID()
Get the ID registered in SEffectManager.
Definition Effect.c:517
void SelectUser(int gamepad=-1)
Definition DayZGame.c:2141
const int MENU_TITLE_SCREEN
Definition constants.c:186

References CreateTitleScreen(), DeleteTitleScreen(), GetGame(), GetID(), GetInput(), GetUIManager(), GetUserManager(), MENU_TITLE_SCREEN, and SelectUser().

Referenced by ConnectLaunch(), DisconnectSessionEx(), MissionLaunch(), and SelectUser().

◆ GetAnalyticsClient()

AnalyticsManagerClient CGame::GetAnalyticsClient ( )
inlineprotected

Definition at line 1399 of file Game.c.

1400 {
1402 }

References m_AnalyticsManagerClient.

◆ GetAnalyticsServer()

AnalyticsManagerServer CGame::GetAnalyticsServer ( )
inlineprotected

Definition at line 1394 of file Game.c.

1395 {
1397 }

References m_AnalyticsManagerServer.

◆ GetBacklit()

Backlit CGame::GetBacklit ( )
inlineprivate

Definition at line 1274 of file DayZGame.c.

1275 {
1276 return m_Backlit;
1277 }

References m_Backlit.

◆ GetBillboardHandler()

BillboardSetHandler CGame::GetBillboardHandler ( )
inlineprotected

Definition at line 3516 of file DayZGame.c.

3517 {
3518 return m_BillboardSetHandler;
3519 }
ref BillboardSetHandler m_BillboardSetHandler
Definition DayZGame.c:851

References m_BillboardSetHandler.

◆ GetCallQueue() [1/2]

override ScriptCallQueue CGame::GetCallQueue ( int call_category)
inlineprivate

◆ GetCallQueue() [2/2]

ScriptCallQueue CGame::GetCallQueue ( int call_category)
inlineprotected

Returns CallQueue for certain category

Parameters
call_categorycall category, valid values are:
CALL_CATEGORY_SYSTEM - calls & timers in this queue are processed every time without any restrictions
CALL_CATEGORY_GUI - calls & timers in this queue are processed when GUI is enabled (even during pase game)
CALL_CATEGORY_GAMEPLAY - calls & timers in this queue are processed only during mission, when game is not paused
usage:
GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(this, "Refresh"); // calls "Refresh" function on "this" with no arguments
GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(this, "Show", new Param1<bool>(true)); // calls "Show" function on "this" with one bool argument
GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(this, "SetPos", new Param2<float, float>(0.2, 0.5)); // calls "SetPos" function on "this" with two float arguments

Definition at line 1336 of file Game.c.

1336{}

◆ GetConnectedInputDeviceList()

array< int > CGame::GetConnectedInputDeviceList ( )
inlineprotected

Definition at line 3454 of file DayZGame.c.

3455 {
3459 }
ref array< int > m_ConnectedInputDeviceList
Definition DayZGame.c:930

References m_ConnectedInputDeviceList.

◆ GetContentDLCService()

proto native ContentDLC CGame::GetContentDLCService ( )
protected

Return DLC service (service for entitlement keys for unlock content)

◆ GetCurrentCameraDirection()

proto native vector CGame::GetCurrentCameraDirection ( )
private

◆ GetCurrentCameraPosition()

proto native vector CGame::GetCurrentCameraPosition ( )
private

◆ GetCurrentDisplayLanguageIdx()

int CGame::GetCurrentDisplayLanguageIdx ( )
inlineprotected

Definition at line 3422 of file DayZGame.c.

3423 {
3426 language_option = ListOptionsAccess.Cast(options.GetOptionByType(OptionAccessType.AT_OPTIONS_LANGUAGE));
3427 int idx = -1;
3428 if (language_option)
3429 idx = language_option.GetIndex();
3430
3431 return idx;
3432 }
OptionAccessType
C++ OptionAccessType.
Definition gameplay.c:1182

◆ GetCurrentEVValue()

float CGame::GetCurrentEVValue ( )
inlineprotected

Definition at line 3412 of file DayZGame.c.

3413 {
3414 return m_EVValue;
3415 }
float m_EVValue
Definition DayZGame.c:917

References m_EVValue.

◆ GetDatabaseID()

string CGame::GetDatabaseID ( )
inlineprotected

Definition at line 1977 of file DayZGame.c.

1978 {
1979 return m_DatabaseID;
1980 }
string m_DatabaseID
Definition DayZGame.c:1968

References m_DatabaseID.

◆ GetDayTime()

proto native float CGame::GetDayTime ( )
private

Returns current daytime on server.

◆ GetDeltaT()

float CGame::GetDeltaT ( )
inlineprotected

Definition at line 2643 of file DayZGame.c.

2644 {
2645 return m_DeltaTime;
2646 }
float m_DeltaTime
Definition DayZGame.c:908

References m_DeltaTime.

◆ GetDiagDrawMode()

proto native int CGame::GetDiagDrawMode ( )
private

Gets current debug draw mode.

◆ GetDiagDrawModeNames()

proto native void CGame::GetDiagDrawModeNames ( out TStringArray diag_names)
private

Get list of all debug draw modes.

◆ GetDiagModeEnable()

proto native bool CGame::GetDiagModeEnable ( int diag_mode)
private

Gets state of specific debug mode.

◆ GetDiagModeNames()

proto native void CGame::GetDiagModeNames ( out TStringArray diag_names)
private

Get list of all debug modes.

◆ GetDragQueue() [1/2]

override DragQueue CGame::GetDragQueue ( )
inlineprivate

Definition at line 1149 of file DayZGame.c.

1150 {
1151 return m_dragQueue;
1152 }

References m_dragQueue.

Referenced by OnUpdate().

◆ GetDragQueue() [2/2]

DragQueue CGame::GetDragQueue ( )
inlineprotected

Returns DragQueue. Callbacks are called on mouse move until mouse button is released, then the queue is cleaned.

Definition at line 1353 of file Game.c.

1353{}

◆ GetEntityByPersitentID()

proto native EntityAI CGame::GetEntityByPersitentID ( int b1,
int b2,
int b3,
int b4 )
protected

Returns EntityAI by its persistent ID parts or null if entity with given persistent ID does not exists.

This function returns valid data only inside AfterLoad event. Do not use this in anywhere else.

Its main purpose is only for keep track on object connections after server restarts, all data related to this function are deleted when server initialization is done.

◆ GetFoodDecayModifier()

float CGame::GetFoodDecayModifier ( )
inlineprotected

Definition at line 3444 of file DayZGame.c.

3445 {
3446#ifdef DIAG_DEVELOPER
3447
3448 if (FeatureTimeAccel.GetFeatureTimeAccelEnabled(ETimeAccelCategories.FOOD_DECAY))
3449 return m_FoodDecayModifier * FeatureTimeAccel.GetFeatureTimeAccelValue();
3450#endif
3451 return m_FoodDecayModifier;
3452 }
float m_FoodDecayModifier
Definition DayZGame.c:893

References m_FoodDecayModifier.

Referenced by IsFoodDecayEnabled().

◆ GetFOVByZoomType()

float CGame::GetFOVByZoomType ( ECameraZoomType type)
inlineprotected

Definition at line 3360 of file DayZGame.c.

3361 {
3362 switch (type)
3363 {
3364 case ECameraZoomType.NONE:
3365 return GetUserFOV();
3366 case ECameraZoomType.NORMAL:
3368 case ECameraZoomType.SHALLOW:
3370 default:
3371 return GetUserFOV();
3372 }
3373 return GetUserFOV();
3374 }
ECameraZoomType
float GetUserFOV()
Definition DayZGame.c:3346
const float DZPLAYER_CAMERA_FOV_EYEZOOM
FOV (vertical angle/2) in radians. Take care to modify also in "basicDefines.hpp".
Definition constants.c:834
const float DZPLAYER_CAMERA_FOV_EYEZOOM_SHALLOW
Definition constants.c:835
static proto float Min(float x, float y)
Returns smaller of two given values.

References GameConstants::DZPLAYER_CAMERA_FOV_EYEZOOM, GameConstants::DZPLAYER_CAMERA_FOV_EYEZOOM_SHALLOW, GetUserFOV(), and Math::Min().

◆ GetFps()

proto native float CGame::GetFps ( )
private

Returns average FPS of last 16 frames.

Returns
fps in milliseconds

◆ GetGameState()

DayZGameState CGame::GetGameState ( )
inlineprivate

Definition at line 1254 of file DayZGame.c.

1255 {
1256 return m_GameState;
1257 }
DayZGameState m_GameState
Definition DayZGame.c:863

References m_GameState.

Referenced by OnEvent(), OnMPConnectionLostEvent(), and TryConnect().

◆ GetHighestSurfaceYDifference()

float CGame::GetHighestSurfaceYDifference ( array< vector > positions)
inlineprotected

Returns the largest height difference between the given positions.

Definition at line 1051 of file Game.c.

1052 {
1053 float high = -9999999;
1054 float low = 99999999;
1055
1056 for (int i = 0; i < positions.Count(); i++)
1057 {
1058 vector pos = positions.Get(i);
1059 pos[1] = SurfaceRoadY(pos[0], pos[2]);
1060 float y = pos[1];
1061
1062 if (y > high)
1063 high = y;
1064
1065 if (y < low)
1066 low = y;
1067
1068 ;
1069 }
1070
1071 return high - low;
1072 }
proto native float SurfaceRoadY(float x, float z, RoadSurfaceDetection rsd=RoadSurfaceDetection.LEGACY)

References SurfaceRoadY(), and y.

◆ GetHostAddress()

proto bool CGame::GetHostAddress ( out string address,
out int port )
private

Gets the server address. (from client)

Referenced by Connect(), OnEvent(), RefreshCurrentServerInfo(), and TryConnect().

◆ GetHostData()

proto GetServersResultRow CGame::GetHostData ( )
private

Gets the server data. (from client)

◆ GetHostName()

proto owned string CGame::GetHostName ( )
private

Gets the server name. (from client)

◆ GetHUDBrightnessSetting()

float CGame::GetHUDBrightnessSetting ( )
inlineprotected

Definition at line 3382 of file DayZGame.c.

3383 {
3384 return g_Game.GetProfileOptionFloat(EDayZProfilesOptions.HUD_BRIGHTNESS);
3385 }
EDayZProfilesOptions

References g_Game.

Referenced by OnInitialize().

◆ GetInput()

◆ GetInventoryItemSize()

proto void CGame::GetInventoryItemSize ( InventoryItem item,
out int width,
out int height )
private

◆ GetLastVisitedServer()

bool CGame::GetLastVisitedServer ( out string ip,
out int port )
inlineprotected

Definition at line 2393 of file DayZGame.c.

2394 {
2395 if (m_Visited)
2396 {
2397 if (m_Visited.Count() > 0)
2398 {
2399 string uid = m_Visited.Get(m_Visited.Count() - 1);
2401 uid.Split(":", output);
2402 ip = output[0];
2403 port = output[1].ToInt();
2404 return true;
2405 }
2406 }
2407 return false;
2408 }

◆ GetLoadingWorkspace()

proto native WorkspaceWidget CGame::GetLoadingWorkspace ( )
private

◆ GetLoadState()

DayZLoadState CGame::GetLoadState ( )
inlineprivate

Definition at line 1264 of file DayZGame.c.

1265 {
1266 return m_LoadState;
1267 }
DayZLoadState m_LoadState
Definition DayZGame.c:864

References m_LoadState.

Referenced by OnInitialize(), SelectGamepad(), SelectUser(), and TryConnect().

◆ GetMainMenuWorld()

proto native owned string CGame::GetMainMenuWorld ( )
protected

Referenced by MainMenuLaunch(), and PartyLaunch().

◆ GetMenuData()

proto native MenuData CGame::GetMenuData ( )
private

Return singleton of MenuData class - at main menu contains characters played with current profile.

◆ GetMenuDefaultCharacterData()

MenuDefaultCharacterData CGame::GetMenuDefaultCharacterData ( bool fill_data = true)
inlineprotected

Definition at line 1379 of file Game.c.

1380 {
1381 //Print("GetMenuDefaultCharacterData");
1382 //DumpStack();
1383 //if used on server, creates an empty container to be filled by received data
1384 if (!m_CharacterData)
1385 {
1387 if (fill_data)
1388 GetGame().GetMenuData().RequestGetDefaultCharacterData(); //fills the structure
1389 }
1390 return m_CharacterData;
1391 }
ref MenuDefaultCharacterData m_CharacterData
Definition Game.c:19

References GetGame(), and m_CharacterData.

Referenced by DeferredInit(), and StoreLoginDataPrepare().

◆ GetMission()

◆ GetMissionFolderPath()

string CGame::GetMissionFolderPath ( )
inlineprivate

Definition at line 1124 of file DayZGame.c.

1125 {
1126 return m_MissionFolderPath;
1127 }
string m_MissionFolderPath
Definition DayZGame.c:885

References m_MissionFolderPath.

◆ GetMissionPath()

string CGame::GetMissionPath ( )
inlineprivate

Definition at line 1119 of file DayZGame.c.

1120 {
1121 return m_MissionPath;
1122 }
string m_MissionPath
Definition DayZGame.c:884

References m_MissionPath.

◆ GetMissionState()

int CGame::GetMissionState ( )
inlineprivate

Definition at line 1162 of file DayZGame.c.

1163 {
1164 return m_MissionState;
1165 }

References m_MissionState.

◆ GetModelName()

string CGame::GetModelName ( string class_name)
inlineprivate

Get name of the p3d file of the given class name.

Parameters
classname of the desired object
Returns
Name of the object's p3d file (without the '.p3d' suffix)

Definition at line 469 of file Game.c.

470 {
471 if (class_name != "")
472 {
473 string cfg = "CfgVehicles " + class_name + " model";
474 string model_path;
476 {
477 int to_substring_end = model_path.Length() - 4; // -4 to leave out the '.p3d' suffix
478 int to_substring_start = 0;
479
480 // Currently we have model path. To get the name out of it we need to parse this string from the end and stop at the first found '\' sign
481 for (int i = to_substring_end; i > 0; i--)
482 {
483 string sign = model_path.Get(i);
484 if (sign == "\\")
485 {
486 to_substring_start = i + 1;
487 break
488 }
489 }
490
492 return model_name;
493 }
494 }
495
496 return "UNKNOWN_P3D_FILE";
497 }
class OptionSelectorMultistate extends OptionSelector class_name

References class_name, ConfigGetText(), and GetGame().

◆ GetModInfos()

proto native void CGame::GetModInfos ( notnull out array< ref ModInfo > modArray)
private

◆ GetModToBeReported()

proto native bool CGame::GetModToBeReported ( )
private

Referenced by DayZGame().

◆ GetMouseCursorDesiredVisibility()

bool CGame::GetMouseCursorDesiredVisibility ( )
inlineprotected

Definition at line 3468 of file DayZGame.c.

3469 {
3471 }
bool m_CursorDesiredVisibilityScript
Definition DayZGame.c:904

References m_CursorDesiredVisibilityScript.

◆ GetNoiseSystem()

proto native NoiseSystem CGame::GetNoiseSystem ( )
private

◆ GetObjectByNetworkId()

proto native Object CGame::GetObjectByNetworkId ( int networkIdLowBits,
int networkIdHighBits )
private

Returns entity identified by network id.

Parameters
networkIdLowBitsidentity used in MP (use NULL in singleplayer)
networkIdHighBitsobject which should be controlled by player

◆ GetObjectsAtPosition()

proto native void CGame::GetObjectsAtPosition ( vector pos,
float radius,
out array< Object > objects,
out array< CargoBase > proxyCargos )
private

Returns list of all objects in circle "radius" around position "pos".

Parameters
pos
radius
objectsoutput array

◆ GetObjectsAtPosition3D()

proto native void CGame::GetObjectsAtPosition3D ( vector pos,
float radius,
out array< Object > objects,
out array< CargoBase > proxyCargos )
private

Returns list of all objects in sphere "radius" around position "pos".

Parameters
pos
radius
objectsoutput array

◆ GetPlayer()

proto native DayZPlayer CGame::GetPlayer ( )
private

◆ GetPlayerByIndex()

DayZPlayer CGame::GetPlayerByIndex ( int index = 0)
inlineprivate

Definition at line 814 of file Game.c.

815 {
818 if (index >= players.Count())
819 return null;
820 return DayZPlayer.Cast(players[index]);
821 }
proto native void GetPlayers(out array< Man > players)

References GetPlayers().

◆ GetPlayerGameName()

string CGame::GetPlayerGameName ( )
inlineprotected

Definition at line 3320 of file DayZGame.c.

3321 {
3322 return m_PlayerName;
3323 }
string m_PlayerName
Definition DayZGame.c:899

References m_PlayerName.

◆ GetPlayerIndentities()

proto native void CGame::GetPlayerIndentities ( out array< PlayerIdentity > identities)
protected

◆ GetPlayerName()

proto void CGame::GetPlayerName ( out string name)
private

Gets current player name.

Parameters
nameoutput value

◆ GetPlayerNameShort()

proto void CGame::GetPlayerNameShort ( int maxLength,
out string name )
private

Gets current player name. If length of player name is grater than maxLength, then it is omitted and append ellipsis.

Parameters
maxLength- max chars in name
name- output value of player name with 'maxLength' characters and then ellipsis "..."

◆ GetPlayerNetworkIDByIdentityID()

proto void CGame::GetPlayerNetworkIDByIdentityID ( int playerIdentityID,
out int networkIdLowBits,
out int networkIdHightBits )
private

returns player's network id from identity id in out parameters

Parameters
identityPlayerIdentity.id used in MP (use NULL in singleplayer)
networkIdLowBitslower bits of 64bit network id
networkIdHighBitshigher bits of 64bit network id
Note
Usable only on server

◆ GetPlayers()

proto native void CGame::GetPlayers ( out array< Man > players)
private

Referenced by GetPlayerByIndex().

◆ GetPointerDirection()

proto native vector CGame::GetPointerDirection ( )
private

Returns the direction where the mouse points, from the camera view.

◆ GetPostUpdateQueue() [1/2]

override ScriptInvoker CGame::GetPostUpdateQueue ( int call_category)
inlineprivate

Definition at line 1139 of file DayZGame.c.

1140 {
1142 }

Referenced by OnPostUpdate().

◆ GetPostUpdateQueue() [2/2]

ScriptInvoker CGame::GetPostUpdateQueue ( int call_category)
inlineprotected

Definition at line 1340 of file Game.c.

1340{}

◆ GetPreviousEVValue()

float CGame::GetPreviousEVValue ( )
inlineprotected

Definition at line 3417 of file DayZGame.c.

3418 {
3419 return m_PreviousEVValue;
3420 }
float m_PreviousEVValue
Definition DayZGame.c:916

References m_PreviousEVValue.

◆ GetPreviousGamepad()

int CGame::GetPreviousGamepad ( )
inlineprotected

Definition at line 2231 of file DayZGame.c.

2232 {
2233 return m_PreviousGamepad;
2234 }
int m_PreviousGamepad
Definition DayZGame.c:905

References m_PreviousGamepad.

◆ GetProfileOption()

bool CGame::GetProfileOption ( EDayZProfilesOptions option)
inlineprivate

Definition at line 1174 of file DayZGame.c.

1175 {
1176 return m_DayZProfileOptions.GetProfileOption(option);
1177 }

Referenced by GetProfileOptionBool().

◆ GetProfileOptionBool()

bool CGame::GetProfileOptionBool ( EDayZProfilesOptions option)
inlineprivate

Definition at line 1179 of file DayZGame.c.

1180 {
1181 return GetProfileOption(option);
1182 }
bool GetProfileOption(EDayZProfilesOptions option)
Definition DayZGame.c:1174

References GetProfileOption().

◆ GetProfileOptionDefault()

bool CGame::GetProfileOptionDefault ( EDayZProfilesOptions option)
inlineprivate

Definition at line 1194 of file DayZGame.c.

1195 {
1196 return m_DayZProfileOptions.GetProfileOptionDefaultBool(option);
1197 }

Referenced by GetProfileOptionDefaultBool().

◆ GetProfileOptionDefaultBool()

bool CGame::GetProfileOptionDefaultBool ( EDayZProfilesOptions option)
inlineprivate

Definition at line 1199 of file DayZGame.c.

1200 {
1202 }
bool GetProfileOptionDefault(EDayZProfilesOptions option)
Definition DayZGame.c:1194

References GetProfileOptionDefault().

◆ GetProfileOptionDefaultFloat()

float CGame::GetProfileOptionDefaultFloat ( EDayZProfilesOptions option)
inlineprivate

Definition at line 1209 of file DayZGame.c.

1210 {
1211 return m_DayZProfileOptions.GetProfileOptionDefaultFloat(option);
1212 }

◆ GetProfileOptionDefaultInt()

int CGame::GetProfileOptionDefaultInt ( EDayZProfilesOptions option)
inlineprivate

Definition at line 1204 of file DayZGame.c.

1205 {
1206 return m_DayZProfileOptions.GetProfileOptionDefaultInt(option);
1207 }

◆ GetProfileOptionFloat()

float CGame::GetProfileOptionFloat ( EDayZProfilesOptions option)
inlineprivate

Definition at line 1189 of file DayZGame.c.

1190 {
1191 return m_DayZProfileOptions.GetProfileOptionFloat(option);
1192 }

◆ GetProfileOptionInt()

int CGame::GetProfileOptionInt ( EDayZProfilesOptions option)
inlineprivate

Definition at line 1184 of file DayZGame.c.

1185 {
1186 return m_DayZProfileOptions.GetProfileOptionInt(option);
1187 }

◆ GetProfileOptionMap()

map< EDayZProfilesOptions, ref DayZProfilesOption > CGame::GetProfileOptionMap ( )
inlineprivate

Definition at line 1234 of file DayZGame.c.

1235 {
1236 return m_DayZProfileOptions.GetProfileOptionMap();
1237 }

◆ GetProfileString()

proto bool CGame::GetProfileString ( string name,
out string value )
private

Gets string from profile variable.

Parameters
nameof the variable
valueoutput value
Returns
true when successful

◆ GetProfileStringList()

proto native void CGame::GetProfileStringList ( string name,
out TStringArray values )
private

Gets array of strings from profile variable.

Parameters
nameof the variable
valuesoutput values
usage:
GetGame().GetProfileStringList("lastInventory", lastInventoryArray);

Referenced by OnInitialize().

◆ GetScreenPos()

proto native vector CGame::GetScreenPos ( vector world_pos)
private

Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos.

◆ GetScreenPosRelative()

proto native vector CGame::GetScreenPosRelative ( vector world_pos)
private

Transforms position in world to position in screen in percentage (0.0 - 1.0) as x, y component of vector, z parameter represents distance between camera and world_pos.

◆ GetSoundScene()

proto native AbstractSoundScene CGame::GetSoundScene ( )
private

Referenced by DeferredInit().

◆ GetSurfaceOrientation()

vector CGame::GetSurfaceOrientation ( float x,
float z )
inlineprotected

Returns tilt of the ground on the given position in degrees, so you can use this value to rotate any item according to terrain.

Definition at line 1075 of file Game.c.

1076 {
1077 vector normal = GetGame().SurfaceGetNormal(x, z);
1078 vector angles = normal.VectorToAngles();
1079 angles[1] = angles[1] + 270; // This fixes rotation of item so it stands vertically. Feel free to change, but fix existing use cases.
1080
1081 //Hack because setorientation and similar functions break and flip stuff upside down when using exactly this vector ¯\_(ツ)_/¯ (note: happens when surface is flat)
1082 if (angles == "0 540 0")
1083 angles = "0 0 0";
1084 return angles;
1085 }

References GetGame(), and x.

◆ GetTickTime()

proto native float CGame::GetTickTime ( )
private

Returns current time from start of the game.

Returns
time in seconds

◆ GetTime()

proto int CGame::GetTime ( )
protected

returns mission time in milliseconds

◆ GetTimerQueue() [1/2]

override TimerQueue CGame::GetTimerQueue ( int call_category)
inlineprivate

Definition at line 1144 of file DayZGame.c.

1145 {
1147 }

References m_timerQueue.

Referenced by OnUpdate().

◆ GetTimerQueue() [2/2]

TimerQueue CGame::GetTimerQueue ( int call_category)
inlineprotected

Returns TimerQueue for certain category

Parameters
call_categorycall category, valid values are:
CALL_CATEGORY_SYSTEM - calls & timers in this queue are processed every time without any restrictions
CALL_CATEGORY_GUI - calls & timers in this queue are processed when GUI is enabled (even during pase game)
CALL_CATEGORY_GAMEPLAY - calls & timers in this queue are processed only during mission, when game is not paused

Definition at line 1348 of file Game.c.

1348{}

◆ GetUIManager()

◆ GetUpdateQueue() [1/2]

override ScriptInvoker CGame::GetUpdateQueue ( int call_category)
inlineprivate

Definition at line 1134 of file DayZGame.c.

1135 {
1137 }

Referenced by OnUpdate().

◆ GetUpdateQueue() [2/2]

ScriptInvoker CGame::GetUpdateQueue ( int call_category)
inlineprotected

Definition at line 1338 of file Game.c.

1338{}

◆ GetUserFOV()

float CGame::GetUserFOV ( )
inlineprotected

Definition at line 3346 of file DayZGame.c.

3347 {
3348 return m_UserFOV;
3349 }

References m_UserFOV.

Referenced by GetFOVByZoomType().

◆ GetUserFOVFromConfig()

static float CGame::GetUserFOVFromConfig ( )
inlinestaticprotected

Definition at line 3351 of file DayZGame.c.

3352 {
3355 if (gameOptions && Class.CastTo(noa, gameOptions.GetOptionByType(OptionAccessType.AT_OPTIONS_FIELD_OF_VIEW)))
3356 return noa.ReadValue();
3357 return 1.0;
3358 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo().

Referenced by DeferredInit(), and SelectGamepad().

◆ GetUserManager()

◆ GetVersion()

proto void CGame::GetVersion ( out string version)
private

◆ GetVoiceLevel()

proto native int CGame::GetVoiceLevel ( Object player = null)
private

Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)

◆ GetWaterDepth()

proto native float CGame::GetWaterDepth ( vector posWS)
protected

◆ GetWeather()

proto native Weather CGame::GetWeather ( )
protected

Returns weather controller object.

◆ GetWorkspace()

proto native WorkspaceWidget CGame::GetWorkspace ( )
private

Referenced by CreateTitleScreen().

◆ GetWorld()

proto native World CGame::GetWorld ( )
private

Referenced by OnEvent().

◆ GetWorldDirectionFromScreen()

proto native vector CGame::GetWorldDirectionFromScreen ( vector world_pos)
private

Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos.

◆ GetWorldName() [1/2]

string CGame::GetWorldName ( )
inlineprivate

Definition at line 799 of file Game.c.

800 {
801 string world_name;
802 g_Game.GetWorldName(world_name);
803 return world_name;
804 }

References g_Game.

◆ GetWorldName() [2/2]

proto void CGame::GetWorldName ( out string world_name)
private

◆ GlobalsInit()

void CGame::GlobalsInit ( )
inlineprivate

Definition at line 1059 of file DayZGame.c.

1060 {
1061 if (GetCEApi())
1062 {
1063 m_IsWorldWetTempUpdateEnabled = (GetCEApi().GetCEGlobalInt("WorldWetTempUpdate") == 1);
1064
1065 m_FoodDecayModifier = GetCEApi().GetCEGlobalFloat("FoodDecay");
1066
1067 //check for legacy INT format, if value == float.MIN when read as FLOAT, it is of type INT, so we read it as such below
1068 if (m_FoodDecayModifier == float.MIN)
1069 m_FoodDecayModifier = GetCEApi().GetCEGlobalInt("FoodDecay");
1070 }
1071
1072 //we need to perform the load here as some objects behaving correctly after spawn is dependent on CE being initialized before spawning them
1074 }
proto native CEApi GetCEApi()
Get the CE API.
const int MIN
Definition EnConvert.c:28
bool m_IsWorldWetTempUpdateEnabled
Definition DayZGame.c:891
static void OnGameplayDataHandlerLoad()

References GetCEApi(), MIN, and ObjectSpawnerHandler::OnGameplayDataHandlerLoad().

◆ GoBuyWorldDLC()

proto native bool CGame::GoBuyWorldDLC ( string sWorldName)
private

◆ HasInventoryJunctureDestination()

proto native bool CGame::HasInventoryJunctureDestination ( Man player,
notnull InventoryLocation dst )
private

◆ HasInventoryJunctureItem()

proto native bool CGame::HasInventoryJunctureItem ( notnull EntityAI item)
private

◆ InitCharacterMenuDataInfo()

void CGame::InitCharacterMenuDataInfo ( int menudata_count)
inlineprotected

Definition at line 3310 of file DayZGame.c.

3311 {
3313 }
int m_OriginalCharactersCount
Definition DayZGame.c:898

◆ InitDamageEffects()

proto native void CGame::InitDamageEffects ( Object effect)
protected

Initialization of damage effects.

◆ InitNotifications()

void CGame::InitNotifications ( )
inlineprotected

Definition at line 1958 of file DayZGame.c.

References NotificationSystem::InitInstance().

Referenced by OnInitialize().

◆ IsAimLogEnabled()

bool CGame::IsAimLogEnabled ( )
inlineprivate

Definition at line 1244 of file DayZGame.c.

1245 {
1246 return m_AimLoggingEnabled;
1247 }

References m_AimLoggingEnabled.

◆ IsAppActive()

proto native bool CGame::IsAppActive ( )
private

Returns if the application is focused on PC, returns true always on console.

Referenced by RefreshMouseCursorVisibility().

◆ IsBoxColliding()

proto native bool CGame::IsBoxColliding ( vector center,
vector orientation,
vector edgeLength,
array< Object > excludeObjects,
array< Object > collidedObjects = NULL )
protected

Finds all objects that are in choosen oriented bounding box (OBB)

Parameters
centervector, center of OBB
orientationvector, direction (front vector), used for calculation of OBB rotation
edgeLengthvector, sizes of whole box
excludeObjectsarray<Object>, objects that should be excluded from collision check
collidedObjectsarray<Object>, out parameter, objects that collided with OBB
Returns
bool, true if at least one object collided with OBB, false otherwise
Note
Object that doesn't have collision geometry will be ignored, as this only uses geometry
vector size = "10 4 8";
excluded_objects.Insert(this);
{
for (int i = 0, c = nearby_objects.Count(); i < c; ++i)
{
PrintString("object " + i.ToString());
}
}
vector GetOrientation()
proto native bool IsBoxColliding(vector center, vector orientation, vector edgeLength, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
Finds all objects that are in choosen oriented bounding box (OBB)
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Definition EnScript.c:344

◆ IsBoxCollidingGeometry()

proto native bool CGame::IsBoxCollidingGeometry ( vector center,
vector orientation,
vector edgeLength,
int iPrimaryType,
int iSecondaryType,
array< Object > excludeObjects,
array< Object > collidedObjects = NULL )
protected

Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)

Parameters
centervector, center of OBB
orientationvector, direction (front vector), used for calculation of OBB rotation
edgeLengthvector, sizes of whole box
iPrimaryTypeint, type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)
iSecondaryTypeint, type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)
excludeObjectsarray<Object>, objects that should be excluded from collision check
collidedObjectsarray<Object>, out parameter, objects that collided with OBB
Returns
bool, true if at least one object collided with OBB, false otherwise
vector size = "10 4 8";
excluded_objects.Insert(this);
{
for (int i = 0, c = nearby_objects.Count(); i < c; ++i)
{
PrintString("object " + i.ToString());
}
}
proto native bool IsBoxCollidingGeometry(vector center, vector orientation, vector edgeLength, int iPrimaryType, int iSecondaryType, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)

◆ IsBoxCollidingGeometryProxy()

proto native bool CGame::IsBoxCollidingGeometryProxy ( notnull BoxCollidingParams params,
array< Object > excludeObjects,
array< ref BoxCollidingResult > collidedObjects = NULL )
protected

◆ IsClient()

proto native bool CGame::IsClient ( )
protected

◆ IsConnecting()

bool CGame::IsConnecting ( )
inlineprotected

Definition at line 3031 of file DayZGame.c.

3032 {
3033 return m_IsConnecting;
3034 }

References m_IsConnecting.

◆ IsDebug()

proto native bool CGame::IsDebug ( )
protected

◆ IsDebugMonitor()

bool CGame::IsDebugMonitor ( )
inlineprotected

Definition at line 1026 of file Game.c.

1027 {
1028 return IsServer() && m_DebugMonitorEnabled;
1029 }
int m_DebugMonitorEnabled
Definition Game.c:10

References IsServer(), and m_DebugMonitorEnabled.

◆ IsDedicatedServer()

proto native bool CGame::IsDedicatedServer ( )
protected

Robust check which is preferred than the above, as it is valid much sooner.

Note
You may want to use #ifdef SERVER instead for slight performance gain...

Referenced by CGame().

◆ IsDigitalCopy()

static bool CGame::IsDigitalCopy ( )
inlinestaticprotected

Definition at line 1010 of file Game.c.

1011 {
1012 return OnlineServices.IsGameActive(false);
1013 }
static bool IsGameActive(bool sim)

References OnlineServices::IsGameActive().

◆ IsFoodDecayEnabled()

bool CGame::IsFoodDecayEnabled ( )
inlineprotected

Definition at line 3439 of file DayZGame.c.

3440 {
3441 return (GetFoodDecayModifier() != 0);
3442 }
float GetFoodDecayModifier()
Definition DayZGame.c:3444

References GetFoodDecayModifier().

◆ IsInPartyChat()

proto native bool CGame::IsInPartyChat ( )
private

Returns whether user is currently in a voice party (currently only supported on xbox)

◆ IsInventoryOpen() [1/2]

override bool CGame::IsInventoryOpen ( )
inlineprivate

Definition at line 1280 of file DayZGame.c.

1281 {
1282#ifndef NO_GUI
1283 if (GetUIManager().FindMenu(MENU_INVENTORY) != NULL)
1284 return true;
1285#endif
1286 return false;
1287 }
const int MENU_INVENTORY
Definition constants.c:170

References GetUIManager(), and MENU_INVENTORY.

◆ IsInventoryOpen() [2/2]

bool CGame::IsInventoryOpen ( )
inlineprotected

Definition at line 1364 of file Game.c.

1365 {
1366 }

◆ IsKindOf()

bool CGame::IsKindOf ( string cfg_class_name,
string cfg_parent_name )
inlineprotected

Returns is class name inherited from parent class name.

Parameters
cfg_class_nameConfig Class name ("Animal_CervusElaphus")
cfg_parent_nameParent Config Class name ("DZ_LightAI")
Returns
bool is class name inherited from parent class name
bool is_kind = GetGame().IsKindOf( "Animal_CervusElaphus", "DZ_LightAI");
>> 1
proto string ToString()

Definition at line 1239 of file Game.c.

1240 {
1242
1243 ConfigGetFullPath("CfgVehicles " + cfg_class_name, full_path);
1244
1245 if (full_path.Count() == 0)
1247
1248 if (full_path.Count() == 0)
1249 ConfigGetFullPath("CfgMagazines " + cfg_class_name, full_path);
1250
1251 if (full_path.Count() == 0)
1252 ConfigGetFullPath("cfgWeapons " + cfg_class_name, full_path);
1253
1254 if (full_path.Count() == 0)
1255 ConfigGetFullPath("CfgNonAIVehicles " + cfg_class_name, full_path);
1256
1257 cfg_parent_name.ToLower();
1258 for (int i = 0; i < full_path.Count(); i++)
1259 {
1260 string tmp = full_path.Get(i);
1261 tmp.ToLower();
1262 if (tmp == cfg_parent_name)
1263 return true;
1264 }
1265
1266 return false;
1267 }
proto native void ConfigGetFullPath(string path, out TStringArray full_path)

References ConfigGetFullPath().

Referenced by DayZGame().

◆ IsLeftCtrlDown()

bool CGame::IsLeftCtrlDown ( )
inlineprotected

Definition at line 2562 of file DayZGame.c.

2563 {
2564 return m_IsCtrlHolding;
2565 }
bool m_IsCtrlHolding
Definition DayZGame.c:886

References m_IsCtrlHolding.

◆ IsLoading()

bool CGame::IsLoading ( )
inlineprotected

Definition at line 3037 of file DayZGame.c.

3038 {
3039 return m_loading && m_loading.IsLoading();
3040 }

Referenced by LoadingHide().

◆ IsMicCapturing()

proto native bool CGame::IsMicCapturing ( )
private

Returns whether mic is currently capturing audio from user.

◆ IsMissionMainMenu()

bool CGame::IsMissionMainMenu ( )
inlineprotected

Returns true when current mission is Main Menu.

Definition at line 1374 of file Game.c.

1375 {
1376 return (g_Game.GetMissionState() == DayZGame.MISSION_STATE_MAINMENU);
1377 }
void DayZGame()
Definition DayZGame.c:947

References DayZGame(), and g_Game.

◆ IsMultiplayer()

proto native bool CGame::IsMultiplayer ( )
protected

Referenced by OnUpdate().

◆ IsNewCharacter()

bool CGame::IsNewCharacter ( )
inlineprotected

Definition at line 3330 of file DayZGame.c.

3331 {
3332 return m_IsNewCharacter;
3333 }
bool m_IsNewCharacter
Definition DayZGame.c:900

References m_IsNewCharacter.

◆ IsObjectAccesible()

proto native bool CGame::IsObjectAccesible ( EntityAI item,
Man player )
private

returns true if player can access item's cargo/attachments (check only distance)

◆ IsPhysicsExtrapolationEnabled()

proto native bool CGame::IsPhysicsExtrapolationEnabled ( )
private

If physics extrapolation is enabled, always true on retail release builds.

◆ IsServer()

proto native bool CGame::IsServer ( )
protected

◆ IsStressTest()

bool CGame::IsStressTest ( )
inlineprivate

Definition at line 1239 of file DayZGame.c.

1240 {
1241 return m_IsStressTest;
1242 }

References m_IsStressTest.

◆ IsSurfaceDigable()

bool CGame::IsSurfaceDigable ( string surface)
inlineprotected

Checks if the surface is digable.

Definition at line 1088 of file Game.c.

1089 {
1090 return ConfigGetInt("CfgSurfaces " + surface + " isDigable");
1091 }

References ConfigGetInt().

◆ IsSurfaceFertile()

bool CGame::IsSurfaceFertile ( string surface)
inlineprotected

Checks if the surface is fertile.

Definition at line 1094 of file Game.c.

1095 {
1096 return ConfigGetInt("CfgSurfaces " + surface + " isFertile");
1097 }

References ConfigGetInt().

◆ IsVisited()

bool CGame::IsVisited ( string ip,
int port )
inlineprotected

Definition at line 2437 of file DayZGame.c.

2438 {
2439 string uid = ip + ":" + port;
2440 int index = m_Visited.Find(uid);
2441 return (index >= 0);
2442 }

◆ IsWorldWetTempUpdateEnabled()

bool CGame::IsWorldWetTempUpdateEnabled ( )
inlineprotected

Definition at line 3434 of file DayZGame.c.

3435 {
3437 }

References m_IsWorldWetTempUpdateEnabled.

◆ JoinLaunch()

void CGame::JoinLaunch ( )
inlineprotected

Definition at line 2048 of file DayZGame.c.

2049 {
2051 SetLoadState(DayZLoadState.JOIN_START);
2052
2053#ifdef PLATFORM_CONSOLE
2054 string join_param;
2055 if (GetCLIParam("join", join_param))
2056 {
2058 user_manager.ParseJoinAsync(join_param);
2059 }
2060#endif
2061 }

References GetCLIParam(), GetUserManager(), SetGameState(), and SetLoadState().

Referenced by OnInitialize().

◆ ListAvailableCharacters() [1/2]

override TStringArray CGame::ListAvailableCharacters ( )
inlineprotected

Definition at line 3089 of file DayZGame.c.

3090 {
3091 return m_CharClassNames;
3092 }

References m_CharClassNames.

◆ ListAvailableCharacters() [2/2]

TStringArray CGame::ListAvailableCharacters ( )
inlineprotected

outputs array of all valid survivor class names

Definition at line 1362 of file Game.c.

1362{}

◆ LoadingHide()

void CGame::LoadingHide ( bool force = false)
inlineprotected

Definition at line 3057 of file DayZGame.c.

3058 {
3059#ifndef NO_GUI
3060 m_loading.Hide(force);
3061 // turn the lights back on
3062 PPEManagerStatic.GetPPEManager().StopAllEffects();
3063#ifdef PLATFORM_CONSOLE
3064 if (!IsLoading())
3065 {
3066 if (m_LoadState != DayZLoadState.MAIN_MENU_START && m_LoadState != DayZLoadState.MAIN_MENU_USER_SELECT)
3068 }
3069#endif
3070#endif
3071 }
bool IsLoading()
Definition DayZGame.c:3037
void UpdateInputDeviceDisconnectWarning()
Definition DayZGame.c:2036

References PPEManagerStatic::GetPPEManager(), IsLoading(), and UpdateInputDeviceDisconnectWarning().

Referenced by OnEvent().

◆ LoadingShow()

void CGame::LoadingShow ( )
inlineprotected

Definition at line 3049 of file DayZGame.c.

3050 {
3051#ifndef NO_GUI
3052 m_loading.ShowEx(this);
3053#endif
3054 }

Referenced by OnEvent().

◆ LoadProgressUpdate()

void CGame::LoadProgressUpdate ( int progressState,
float progress,
string title )
inlineprotected

Definition at line 1861 of file DayZGame.c.

1862 {
1863#ifndef NO_GUI
1864 switch (progressState)
1865 {
1866 case PROGRESS_START:
1867 {
1868#ifndef NO_GUI
1869 // get out of the black screen immediately
1870 GetUIManager().ScreenFadeOut(0);
1871#endif
1872 m_loading.Inc();
1873 m_loading.SetTitle(title);
1874 if (m_loading.m_HintPanel)
1875 m_loading.m_HintPanel.ShowRandomPage();
1876
1877 }
1878 break;
1879
1880 case PROGRESS_FINISH:
1881 {
1882 m_loading.Dec();
1883 }
1884 break;
1885
1886 case PROGRESS_PROGRESS:
1887 {
1888 m_loading.SetProgress(progress);
1889
1890 }
1891 break;
1892
1893 case PROGRESS_UPDATE:
1894 {
1895 m_loading.SetProgress(0);
1896 }
1897 break;
1898 }
1899#endif
1900 }
const int PROGRESS_UPDATE
Definition gameplay.c:384
PlayerIdentity PROGRESS_START
const int PROGRESS_PROGRESS
Definition gameplay.c:383
const int PROGRESS_FINISH
Definition gameplay.c:382

References GetUIManager(), PROGRESS_FINISH, PROGRESS_PROGRESS, PROGRESS_START, and PROGRESS_UPDATE.

Referenced by OnEvent().

◆ LoadVersion()

proto native int CGame::LoadVersion ( )
private

Returns actual storage version - loading.

◆ LoginTimeCountdown()

void CGame::LoginTimeCountdown ( )
inlineprotected

Definition at line 1765 of file DayZGame.c.

1766 {
1767 if (m_LoginTime > 0)
1768 {
1771
1772 m_LoginTime--;
1773 }
1774 else
1775 {
1776 // stop the call loop
1778 }
1779 }
void CancelLoginTimeCountdown()
Definition DayZGame.c:1335

References CancelLoginTimeCountdown().

◆ LogoutRequestCancel()

proto native void CGame::LogoutRequestCancel ( )
protected

◆ LogoutRequestTime()

proto native void CGame::LogoutRequestTime ( )
protected

Logout methods.

◆ MainMenuLaunch()

void CGame::MainMenuLaunch ( )
inlineprotected

Definition at line 2096 of file DayZGame.c.

2097 {
2098#ifdef PLATFORM_WINDOWS
2100 if (user_manager)
2101 {
2102 if (user_manager.GetTitleInitiator())
2103 user_manager.SelectUserEx(user_manager.GetTitleInitiator());
2104 }
2105#endif
2106
2107 SetGameState(DayZGameState.MAIN_MENU);
2108 SetLoadState(DayZLoadState.MAIN_MENU_START);
2111 }
proto native owned string GetMainMenuWorld()
proto native void StartRandomCutscene(string world)
Starts intro.

References DeleteTitleScreen(), GetMainMenuWorld(), GetUserManager(), SetGameState(), SetLoadState(), and StartRandomCutscene().

Referenced by DisconnectSessionEx(), and OnInitialize().

◆ MissionLaunch()

void CGame::MissionLaunch ( )
inlineprotected

Definition at line 2113 of file DayZGame.c.

2114 {
2116 if (user_manager)
2117 {
2118 if (user_manager.GetTitleInitiator())
2119 user_manager.SelectUserEx(user_manager.GetTitleInitiator());
2120 }
2121
2122 SetGameState(DayZGameState.IN_GAME);
2123 SetLoadState(DayZLoadState.MISSION_START);
2124
2125
2126#ifndef PLATFORM_WINDOWS
2127#ifdef PLATFORM_CONSOLE
2128#ifndef DEVELOPER
2130 GamepadCheck();
2131 return;
2132#endif
2133#endif
2134#endif
2135
2136 string mission;
2137 GetCLIParam("mission", mission);
2139 }
proto native void PlayMission(string path)
Starts mission (equivalent for SQF playMission). You MUST use double slash \.

References CreateTitleScreen(), GamepadCheck(), GetCLIParam(), GetUserManager(), mission, PlayMission(), SetGameState(), and SetLoadState().

Referenced by OnInitialize().

◆ MuteAllPlayers()

proto native void CGame::MuteAllPlayers ( string listenerId,
bool mute )
private

Mute all players for listenerId.

Parameters
listenerIduid of player
mutetrue, if player can not listen anybody. Otherwise false.

◆ MutePlayer()

proto native void CGame::MutePlayer ( string muteUID,
string playerUID,
bool mute )
private

Mutes voice of source player to target player.

Parameters
muteUIDuid of player you want to mute
playerUIDuid of player that (doesnt't) want to hear muteUID

Referenced by OnRPC().

◆ NightVissionLightParams()

proto native void CGame::NightVissionLightParams ( float lightIntensityMul,
float noiseIntensity )
protected

set night vission parameters (set to zero when to disable it)

Parameters
lightIntensityMulmultiplicator of lights intensity
noiseIntensityintensity of noise PP

◆ ObjectDelete()

proto native void CGame::ObjectDelete ( Object obj)
private

◆ ObjectDeleteOnClient()

proto native void CGame::ObjectDeleteOnClient ( Object obj)
private

◆ ObjectGetDisplayName()

proto void CGame::ObjectGetDisplayName ( Object obj,
out string name )
private

◆ ObjectGetSelectionPosition()

proto native vector CGame::ObjectGetSelectionPosition ( Object obj,
string name )
private

◆ ObjectGetSelectionPositionLS()

proto native vector CGame::ObjectGetSelectionPositionLS ( Object obj,
string name )
private

◆ ObjectGetSelectionPositionMS()

proto native vector CGame::ObjectGetSelectionPositionMS ( Object obj,
string name )
private

◆ ObjectGetSelectionPositionWS()

proto native vector CGame::ObjectGetSelectionPositionWS ( Object obj,
string name )
private

◆ ObjectGetType()

proto void CGame::ObjectGetType ( Object obj,
out string type )
private

◆ ObjectIsKindOf()

bool CGame::ObjectIsKindOf ( Object object,
string cfg_parent_name )
inlineprotected

Returns is object inherited from parent class name.

Parameters
objectObject
cfg_parent_nameParent Config Class name ("DZ_LightAI")
Returns
bool is object inherited from parent class name
bool is_kind = GetGame().IsKindOf( my_animal, "DZ_LightAI");
>> 1

Definition at line 1281 of file Game.c.

1282 {
1285
1286 cfg_parent_name.ToLower();
1287
1288 for (int i = 0; i < full_path.Count(); i++)
1289 {
1290 string tmp = full_path.Get(i);
1291 tmp.ToLower();
1292 if (tmp == cfg_parent_name)
1293 return true;
1294 }
1295
1296 return false;
1297 }
proto native void ConfigGetObjectFullPath(Object obj, out TStringArray full_path)

References ConfigGetObjectFullPath().

◆ ObjectModelToWorld()

proto native vector CGame::ObjectModelToWorld ( Object obj,
vector modelPos )
private

◆ ObjectRelease()

proto native int CGame::ObjectRelease ( Object obj)
private

RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote objects). do not use if not sure what you do.

◆ ObjectWorldToModel()

proto native vector CGame::ObjectWorldToModel ( Object obj,
vector worldPos )
private

◆ OnActivateMessage() [1/2]

override void CGame::OnActivateMessage ( )
inlineprotected

Definition at line 1909 of file DayZGame.c.

1910 {
1912 }

References RefreshMouseCursorVisibility().

◆ OnActivateMessage() [2/2]

void CGame::OnActivateMessage ( )
inlineprivate

Called when recieving focus (windows)

Definition at line 107 of file Game.c.

108 {
109 }

◆ OnAfterCreate() [1/2]

override void CGame::OnAfterCreate ( )
inlineprotected

Definition at line 1903 of file DayZGame.c.

1904 {
1905 Math.Randomize(-1);
1906 }

References Math::Randomize().

◆ OnAfterCreate() [2/2]

void CGame::OnAfterCreate ( )
inlineprivate

Called after creating of CGame instance.

Definition at line 100 of file Game.c.

101 {
102 }

◆ OnConnectivityStatChange()

bool CGame::OnConnectivityStatChange ( EConnectivityStatType type,
EConnectivityStatLevel newLevel,
EConnectivityStatLevel oldLevel )
inlineprotected

Definition at line 1641 of file DayZGame.c.

1642 {
1643 if (!GetGame() || !GetGame().GetMission())
1644 return false;
1645 Hud hud = GetGame().GetMission().GetHud();
1646 if (!hud)
1647 return false;
1648
1649 hud.SetConnectivityStatIcon(type, newLevel);
1650 return true;
1651 }

References GetGame(), and GetMission().

Referenced by SetConnectivityStatState().

◆ OnDeactivateMessage() [1/2]

override void CGame::OnDeactivateMessage ( )
inlineprotected

Definition at line 1915 of file DayZGame.c.

1916 {
1918 }

References RefreshMouseCursorVisibility().

◆ OnDeactivateMessage() [2/2]

void CGame::OnDeactivateMessage ( )
inlineprivate

Called when loosing focus (windows)

Definition at line 114 of file Game.c.

115 {
116 }

◆ OnDeviceReset() [1/2]

override void CGame::OnDeviceReset ( )
inlineprotected

Definition at line 2634 of file DayZGame.c.

2635 {
2636 m_IsCtrlHolding = false;
2637 m_IsWinHolding = false;
2638 m_IsLeftAltHolding = false;
2639 m_IsRightAltHolding = false;
2640 }
bool m_IsRightAltHolding
Definition DayZGame.c:889
bool m_IsWinHolding
Definition DayZGame.c:887
bool m_IsLeftAltHolding
Definition DayZGame.c:888

◆ OnDeviceReset() [2/2]

void CGame::OnDeviceReset ( )
inlineprivate

Called when inputs is not possible (Steam overlay active or something), all internal script variables should be reset here!

Definition at line 129 of file Game.c.

130 {
131 }

◆ OnEvent() [1/2]

override void CGame::OnEvent ( EventType eventTypeId,
Param params )
inlineprivate

Definition at line 1359 of file DayZGame.c.

1360 {
1361 string address;
1362 int port;
1363 int high, low;
1364
1365 switch (eventTypeId)
1366 {
1367 case StartupEventTypeID:
1368 {
1369#ifndef SERVER
1370 // Just call it, to create the global instance if it doesn't exist yet
1371 ParticleManager.GetInstance();
1372#endif
1373 break;
1374 }
1376 {
1377#ifndef SERVER
1379#endif
1380 m_FirstConnect = true;
1382 break;
1383 }
1385 {
1386 LoadingHide();
1388 SetConnecting(false);
1389 SetGameState(DayZGameState.MAIN_MENU);
1390 m_FirstConnect = true;
1391#ifdef PLATFORM_CONSOLE
1392 if (GetUserManager().GetSelectedUser())
1393 {
1396 if (GetGameState() == DayZGameState.IN_GAME)
1397 SetLoadState(DayZLoadState.MAIN_MENU_START);
1398 }
1399 m_Notifications.ClearVoiceNotifications();
1400#endif
1401
1402 // analytics - disconnected player
1404 discData.m_CharacterId = g_Game.GetDatabaseID();
1405 discData.m_Reason = "quit";
1407 break;
1408 }
1410 {
1412 LoadingHide(true);
1413 SetConnecting(false);
1415
1416 if (GetGameState() == DayZGameState.CONNECTING)
1417 SetGameState(DayZGameState.MAIN_MENU);
1418
1419 break;
1420 }
1422 {
1423 LoadingHide(true);
1425
1426 SetGameState(DayZGameState.IN_GAME);
1427
1428 // analytics - spawned
1430 spawnData.m_CharacterId = g_Game.GetDatabaseID();
1431 spawnData.m_Lifetime = 0;
1432 spawnData.m_Position = vector.Zero;
1433 if (GetPlayer())
1434 spawnData.m_Position = GetPlayer().GetPosition();
1435 spawnData.m_DaytimeHour = 0;
1436 spawnData.m_Population = 0;
1438
1439#ifdef PLATFORM_CONSOLE
1440 m_Notifications.ClearVoiceNotifications();
1442#endif
1443 if (m_FirstConnect)
1444 {
1445 m_FirstConnect = false;
1448
1449#ifdef PLATFORM_CONSOLE
1450#ifndef PLATFORM_WINDOWS // if app is not on Windows with -XBOX parameter
1451 if (null != GetUserManager().GetSelectedUser())
1452 {
1455 }
1456#endif
1457#endif
1458 }
1459
1461
1462 break;
1463 }
1465 {
1468 {
1469 int duration = conLost_params.param1;
1471 }
1472 break;
1473 }
1475 {
1476 LoadingShow();
1477 break;
1478 }
1480 {
1481 GetCallQueue(CALL_CATEGORY_SYSTEM).Call(g_Game.CheckDialogs);
1482 break;
1483 }
1485 {
1488 {
1489
1490 }
1491 break;
1492 }
1494 {
1497 LoadProgressUpdate(prog_params.param1, prog_params.param2, prog_params.param3);
1498 break;
1499 }
1501 {
1505 break;
1506 }
1507 case RespawnEventTypeID:
1508 {
1512 break;
1513 }
1514 case PreloadEventTypeID:
1515 {
1519 break;
1520 }
1521 case LogoutEventTypeID:
1522 {
1525 GetCallQueue(CALL_CATEGORY_GUI).Call(GetMission().StartLogoutMenu, logoutParams.param1);
1526 break;
1527 }
1529 {
1531 break;
1532 }
1534 {
1537
1538 string msg1 = loginStatusParams.param1;
1539 string msg2 = loginStatusParams.param2;
1540 string finalMsg;
1541
1542 // write either to login time screen or loading screen
1544 {
1545 finalMsg = msg1;
1546 // login time screen supports two lines
1547 if (msg2.Length() > 0)
1548 finalMsg += "\n" + msg2;
1549
1550 m_LoginTimeScreen.SetStatus(finalMsg);
1551 }
1552 else if (m_loading)
1553 {
1554 // loading only one line, but it's a long one
1555 finalMsg = msg1 + " " + msg2;
1556 m_loading.SetStatus(finalMsg);
1557 }
1558 break;
1559 }
1561 {
1562 g_Game.SetGameState(DayZGameState.CONNECTING);
1563 SetConnecting(true);
1564 break;
1565 }
1567 {
1568 g_Game.SetGameState(DayZGameState.MAIN_MENU);
1569 SetConnecting(false);
1571 {
1572 m_ConnectFromJoin = false;
1573 AbortMission();
1574 }
1575 break;
1576 }
1578 {
1581 Print("### DLC Ownership failed !!! Map: " + dlcParams.param1);
1582 break;
1583 }
1585 {
1588 {
1590
1591 int pingAvg = playerIdentity.GetPingAvg();
1592 if (pingAvg < GetWorld().GetPingWarningThreshold())
1594 else if (pingAvg < GetWorld().GetPingCriticalThreshold())
1596 else
1598 }
1599 break;
1600 }
1602 {
1605 {
1606#ifdef DIAG_DEVELOPER
1608#endif
1609 float fps = serverFpsStatsParams.param1;
1610 if (fps > GetWorld().GetServerFpsWarningThreshold())
1612 else if (fps > GetWorld().GetServerFpsCriticalThreshold())
1614 else
1616 }
1617 break;
1618 }
1619 }
1620
1622
1624 if (mission)
1626
1628 if (emh)
1629 emh.OnEvent(eventTypeId, params);
1630 }
EConnectivityStatType
static void PlayerDisconnected(StatsEventDisconnectedData data)
static void PlayerSpawned(StatsEventSpawnedData data)
void SetConnectivityStatState(EConnectivityStatType type, EConnectivityStatLevel level)
Definition DayZGame.c:1632
void CancelLoginQueue()
Definition DayZGame.c:1321
void AddVisitedServer(string ip, int port)
Definition DayZGame.c:2410
void LoadingShow()
Definition DayZGame.c:3049
proto native World GetWorld()
void LoadingHide(bool force=false)
Definition DayZGame.c:3057
void OnLoginTimeEvent(int loginTime)
Definition DayZGame.c:1727
void OnMPConnectionLostEvent(int duration)
Definition DayZGame.c:1844
void OnRespawnEvent(int time)
Definition DayZGame.c:1782
void OnPreloadEvent(vector pos)
Definition DayZGame.c:1810
bool m_FirstConnect
Definition DayZGame.c:866
void ClearConnectivityStates()
Definition DayZGame.c:1351
proto native void AbortMission()
Returns to main menu, leave world empty for using last mission world.
void LoadProgressUpdate(int progressState, float progress, string title)
Definition DayZGame.c:1861
static void ResetClientData()
Definition ClientData.c:13
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerMod...
static proto native ErrorModuleHandler GetInstance()
Gets the EMH Instance.
void OnEvent(EventType eventTypeId, Param params)
Definition gameplay.c:694
static void LoadVoicePrivilege()
static void LeaveGameplaySession()
static void EnterGameplaySession()
static void SetMultiplayState(bool state)
static void Init()
static void ClearCurrentServerInfo()
The class that will be instanced (moddable)
Definition gameplay.c:376
static proto native void DestroyAllPendingProgresses()
static VONManagerBase GetInstance()
Main way to access VONManager functionality from script.
Definition VONManager.c:249
const EventType MPSessionEndEventTypeID
no params
Definition gameplay.c:462
const EventType ConnectingStartEventTypeID
no params
Definition gameplay.c:552
const EventType LoginStatusEventTypeID
params: LoginStatusEventParams
Definition gameplay.c:524
const EventType WorldCleaupEventTypeID
no params
Definition gameplay.c:456
const EventType SelectedUserChangedEventTypeID
no params
Definition gameplay.c:528
const EventType RespawnEventTypeID
params: RespawnEventParams
Definition gameplay.c:518
const EventType MPSessionFailEventTypeID
no params
Definition gameplay.c:464
const EventType StartupEventTypeID
no params
Definition gameplay.c:454
const EventType DialogQueuedEventTypeID
no params
Definition gameplay.c:480
const EventType MPSessionStartEventTypeID
no params
Definition gameplay.c:460
const EventType PreloadEventTypeID
params: PreloadEventParams
Definition gameplay.c:520
const EventType LoginTimeEventTypeID
params: LoginTimeEventParams
Definition gameplay.c:516
const EventType ServerFpsStatsUpdatedEventTypeID
params: ServerFpsStatsUpdatedEventParams
Definition gameplay.c:512
const EventType ConnectivityStatsUpdatedEventTypeID
params: ConnectivityStatsUpdatedEventParams
Definition gameplay.c:510
const EventType MPConnectionLostEventTypeID
params: MPConnectionLostEventParams
Definition gameplay.c:468
const EventType LogoutEventTypeID
params: LogoutEventParams
Definition gameplay.c:522
const EventType MPSessionPlayerReadyEventTypeID
no params
Definition gameplay.c:466
const EventType DLCOwnerShipFailedEventTypeID
params: DLCOwnerShipFailedParams
Definition gameplay.c:548
const EventType ProgressEventTypeID
params: ProgressEventParams
Definition gameplay.c:474
const EventType ChatMessageEventTypeID
params: ChatMessageEventParams
Definition gameplay.c:484
const EventType ConnectingAbortEventTypeID
no params
Definition gameplay.c:554

References AbortMission(), AddVisitedServer(), CALL_CATEGORY_GUI, CALL_CATEGORY_SYSTEM, CancelLoginQueue(), CancelLoginTimeCountdown(), Class::CastTo(), ChatMessageEventTypeID, ClearConnectivityStates(), OnlineServices::ClearCurrentServerInfo(), ConnectingAbortEventTypeID, ConnectingStartEventTypeID, ConnectivityStatsUpdatedEventTypeID, ProgressAsync::DestroyAllPendingProgresses(), DialogQueuedEventTypeID, DLCOwnerShipFailedEventTypeID, OnlineServices::EnterGameplaySession(), g_Game, GetCallQueue(), GetGameState(), GetHostAddress(), ErrorModuleHandler::GetInstance(), VONManager::GetInstance(), GetMission(), GetPlayer(), GetUserManager(), GetWorld(), OnlineServices::Init(), OnlineServices::LeaveGameplaySession(), LoadingHide(), LoadingShow(), LoadProgressUpdate(), OnlineServices::LoadVoicePrivilege(), LoginStatusEventTypeID, LoginTimeEventTypeID, LogoutEventTypeID, mission, MPConnectionLostEventTypeID, MPSessionEndEventTypeID, MPSessionFailEventTypeID, MPSessionPlayerReadyEventTypeID, MPSessionStartEventTypeID, Mission::OnEvent(), OnLoginTimeEvent(), OnMPConnectionLostEvent(), OnPreloadEvent(), OnRespawnEvent(), ParticleManager(), Analytics::PlayerDisconnected(), Analytics::PlayerSpawned(), PreloadEventTypeID, Print(), ProgressEventTypeID, ClientData::ResetClientData(), RespawnEventTypeID, SelectedUserChangedEventTypeID, ServerFpsStatsUpdatedEventTypeID, SetConnecting(), SetConnectivityStatState(), SetGameState(), SetLoadState(), OnlineServices::SetMultiplayState(), StartupEventTypeID, UpdateInputDeviceDisconnectWarning(), WorldCleaupEventTypeID, and vector::Zero.

◆ OnEvent() [2/2]

void CGame::OnEvent ( EventType eventTypeId,
Param params )
inlineprivate

Called when some system event occur.

Parameters
eventTypeIdevent type.
paramsParam object, cast to specific param class to get parameters for particular event.

Definition at line 82 of file Game.c.

83 {
84 }

◆ OnGameplayDataHandlerLoad()

void CGame::OnGameplayDataHandlerLoad ( )
inlineprivate

Definition at line 1155 of file DayZGame.c.

1156 {
1157
1158 }

◆ OnInitialize() [1/2]

override bool CGame::OnInitialize ( )
inlineprotected

Definition at line 1921 of file DayZGame.c.

1922 {
1924
1927
1929 m_Visited = new TStringArray;
1930 GetProfileStringList("SB_Visited", m_Visited);
1931
1932 if (GetLoadState() == DayZLoadState.UNDEFINED)
1933 {
1934 string param;
1935
1936 if (GetCLIParam("join", param))
1937 {
1938 JoinLaunch();
1939#ifndef PLATFORM_PS4
1941#endif
1942 }
1943 else if (GetCLIParam("connect", param))
1944 ConnectLaunch();
1945 else if (GetCLIParam("mission", param))
1946 MissionLaunch();
1947 else if (GetCLIParam("party", param))
1948 PartyLaunch();
1949 else
1951
1952 return true;
1953 }
1954
1955 return false;
1956 }
void InitNotifications()
Definition DayZGame.c:1958
proto native void GetProfileStringList(string name, out TStringArray values)
Gets array of strings from profile variable.
void ConnectLaunch()
Definition DayZGame.c:2063
void RegisterProfilesOptions()
Definition DayZGame.c:1077
void JoinLaunch()
Definition DayZGame.c:2048
DayZLoadState GetLoadState()
Definition DayZGame.c:1264
void MissionLaunch()
Definition DayZGame.c:2113
void PartyLaunch()
Definition DayZGame.c:2082
float GetHUDBrightnessSetting()
Definition DayZGame.c:3382
void SetHudBrightness(float value)
Definition DayZGame.c:3376
static void PreloadParticles()
Preloads all particles.

References ConnectLaunch(), CreateTitleScreen(), GetCLIParam(), GetHUDBrightnessSetting(), GetLoadState(), GetProfileStringList(), InitNotifications(), JoinLaunch(), MainMenuLaunch(), MissionLaunch(), PartyLaunch(), ParticleList::PreloadParticles(), RegisterProfilesOptions(), and SetHudBrightness().

◆ OnInitialize() [2/2]

bool CGame::OnInitialize ( )
inlineprivate

Called once before game update loop starts, ret value indicates if init was done in scripts, otherwise it is done in the engine.

Definition at line 121 of file Game.c.

122 {
123 return false;
124 }

◆ OnKeyPress() [1/2]

override void CGame::OnKeyPress ( int key)
inlineprotected

Definition at line 2568 of file DayZGame.c.

2569 {
2570
2571 if (key == KeyCode.KC_LCONTROL)
2572 m_IsCtrlHolding = true;
2573
2574 if (key == KeyCode.KC_LMENU)
2575 m_IsLeftAltHolding = true;
2576
2577 if (key == KeyCode.KC_RMENU)
2578 m_IsRightAltHolding = true;
2579
2582
2584 if (mission)
2586
2587#ifdef DEVELOPER
2588 if ((m_IsLeftAltHolding || m_IsLeftAltHolding) && key == KeyCode.KC_F4)
2589 RequestExit(0);
2590#endif
2591
2592 }
proto native void RequestExit(int code)
Sets exit code and quits in the right moment.
void OnKeyPress(int key)
Definition gameplay.c:690
override bool OnKeyDown(Widget w, int x, int y, int key)
KeyCode
Definition EnSystem.c:157

References GetMission(), mission, UIScriptedMenu::OnKeyDown(), Mission::OnKeyPress(), and RequestExit().

◆ OnKeyPress() [2/2]

void CGame::OnKeyPress ( int key)
inlineprivate

Called when key is pressed.

Parameters
keydirect input key code (DIK)

Definition at line 155 of file Game.c.

156 {
157 }

◆ OnKeyRelease() [1/2]

override void CGame::OnKeyRelease ( int key)
inlineprotected

Definition at line 2595 of file DayZGame.c.

2596 {
2597 if (key == KeyCode.KC_LCONTROL)
2598 m_IsCtrlHolding = false;
2599
2600 if (key == KeyCode.KC_LWIN)
2601 m_IsWinHolding = false;
2602
2603 if (key == KeyCode.KC_LMENU || key == KeyCode.KC_RMENU)
2604 m_IsLeftAltHolding = false;
2605
2606 if (key == KeyCode.KC_RMENU)
2607 m_IsRightAltHolding = false;
2608
2611
2613 if (mission)
2615 }
void OnKeyRelease(int key)
Definition gameplay.c:691
override bool OnKeyUp(Widget w, int x, int y, int key)

References GetMission(), mission, Mission::OnKeyRelease(), and UIScriptedMenu::OnKeyUp().

◆ OnKeyRelease() [2/2]

void CGame::OnKeyRelease ( int key)
inlineprivate

Called when key is released.

Parameters
keydirect input key code (DIK)

Definition at line 163 of file Game.c.

164 {
165 }

◆ OnLicenseChanged()

void CGame::OnLicenseChanged ( )
inlineprivate

Definition at line 92 of file Game.c.

93 {
94
95 }

◆ OnLoginTimeEvent()

void CGame::OnLoginTimeEvent ( int loginTime)
inlineprotected

Definition at line 1727 of file DayZGame.c.

1728 {
1729#ifndef NO_GUI
1730 // remove login queue if exits
1732
1733 GetUserManager().GetUserDatabaseIdAsync();
1734
1736
1737 // timer for login
1738 if (m_LoginTime > 0)
1739 {
1740 if (!m_LoginTimeScreen)
1741 {
1742 GetUIManager().CloseAll();
1743
1744 if (GetMission())
1745 {
1746 UIScriptedMenu parent = GetUIManager().GetMenu();
1747 EnterLoginTime(parent);
1748 }
1749 else
1750 {
1751 m_LoginTimeScreen = new LoginTimeStatic();
1752 GetUIManager().ShowScriptedMenu(m_LoginTimeScreen, null);
1753 }
1754 }
1755
1757 m_LoginTimeScreen.Show();
1758
1759 GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(this.LoginTimeCountdown, 1000, true);
1760 }
1761#endif
1762 }
void EnterLoginTime(UIMenuPanel parent)
Definition DayZGame.c:1838

References CALL_CATEGORY_SYSTEM, CancelLoginQueue(), EnterLoginTime(), GetCallQueue(), GetMission(), GetUIManager(), and GetUserManager().

Referenced by OnEvent().

◆ OnMouseButtonPress() [1/2]

override void CGame::OnMouseButtonPress ( int button)
inlineprotected

Definition at line 2618 of file DayZGame.c.

2619 {
2621 if (mission)
2623 }
void OnMouseButtonPress(int button)
Definition gameplay.c:692

References GetMission(), mission, and Mission::OnMouseButtonPress().

◆ OnMouseButtonPress() [2/2]

void CGame::OnMouseButtonPress ( int button)
inlineprivate

Called when mouse button is pressed.

Parameters
button- number of button Mouse API

Definition at line 171 of file Game.c.

172 {
173 }

◆ OnMouseButtonRelease() [1/2]

override void CGame::OnMouseButtonRelease ( int button)
inlineprotected

Definition at line 2626 of file DayZGame.c.

2627 {
2629 if (mission)
2631 }
void OnMouseButtonRelease(int button)
Definition gameplay.c:693

References GetMission(), mission, and Mission::OnMouseButtonRelease().

◆ OnMouseButtonRelease() [2/2]

void CGame::OnMouseButtonRelease ( int button)
inlineprivate

Called when mouse button is released.

Parameters
button- number of button Mouse API

Definition at line 179 of file Game.c.

180 {
181 }

◆ OnMPConnectionLostEvent()

void CGame::OnMPConnectionLostEvent ( int duration)
inlineprotected

Definition at line 1844 of file DayZGame.c.

1845 {
1846 if (duration >= 0)//(-1 means conn. reestablished)
1848 else
1850
1851#ifdef PLATFORM_PS4
1852 //PSN Set multiplay state
1853 if (duration < 0 && GetGameState() == DayZGameState.IN_GAME)
1855 else
1857#endif
1858 }

References GetGameState(), SetConnectivityStatState(), and OnlineServices::SetMultiplayState().

Referenced by OnEvent().

◆ OnPostUpdate() [1/2]

override void CGame::OnPostUpdate ( bool doSim,
float timeslice )
inlineprotected

Definition at line 2715 of file DayZGame.c.

2716 {
2718 bool gameIsRunning = false;
2719
2720 if (doSim && mission && !mission.IsPaused())
2721 gameIsRunning = true;
2722
2724
2725#ifndef NO_GUI
2726 if (m_loading && m_loading.IsLoading())
2727 {
2728 }
2729 else if (m_LoginTimeScreen && m_LoginTimeScreen.IsStatic())
2730 {
2731 }
2732 else
2734#endif
2735
2736 if (gameIsRunning)
2738 }
override ScriptInvoker GetPostUpdateQueue(int call_category)
Definition DayZGame.c:1139
bool IsPaused()
Definition gameplay.c:733

References CALL_CATEGORY_GAMEPLAY, CALL_CATEGORY_GUI, CALL_CATEGORY_SYSTEM, GetMission(), GetPostUpdateQueue(), Mission::IsPaused(), and mission.

◆ OnPostUpdate() [2/2]

void CGame::OnPostUpdate ( bool doSim,
float timeslice )
inlineprivate

Called on World update after simulation of entities.

Parameters
doSimFalse when simulation is paused, True otherwise
timeslicetime elapsed from last call

Definition at line 147 of file Game.c.

148 {
149 }

◆ OnPreloadEvent()

void CGame::OnPreloadEvent ( vector pos)
inlineprotected

Definition at line 1810 of file DayZGame.c.

1811 {
1812 // cancel only login time (respawn time is parallel with preload, but login time is not)
1813 if (m_LoginTimeScreen && !m_LoginTimeScreen.IsRespawn())
1815
1816 // tell game to continue
1818 }
void StoreLoginDataPrepare()
Definition DayZGame.c:1822

References CancelLoginTimeCountdown(), and StoreLoginDataPrepare().

Referenced by OnEvent().

◆ OnProcessLifetimeChanged()

void CGame::OnProcessLifetimeChanged ( int plmtype)
inlineprivate

Definition at line 87 of file Game.c.

88 {
89
90 }

◆ OnProjectileStopped()

void CGame::OnProjectileStopped ( ProjectileStoppedInfo info)
inlineprotected

Definition at line 3140 of file DayZGame.c.

3141 {
3142 string simulation;
3143
3144 GetGame().ConfigGetText("cfgAmmo " + info.GetAmmoType() + " simulation", simulation);
3145
3146 if (simulation == "shotArrow")
3147 {
3148 string pile;
3149
3150 GetGame().ConfigGetText("cfgAmmo " + info.GetAmmoType() + " spawnPileType", pile);
3151
3153 arrow.PlaceOnSurface();
3154 arrow.SetFromProjectile(info);
3155 }
3156 }
const int ECE_DYNAMIC_PERSISTENCY
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.

References CreateObjectEx(), ECE_DYNAMIC_PERSISTENCY, and GetGame().

◆ OnProjectileStoppedInObject()

void CGame::OnProjectileStoppedInObject ( ObjectCollisionInfo info)
inlineprotected

Definition at line 3186 of file DayZGame.c.

3187 {
3188 string simulation;
3189
3190 GetGame().ConfigGetText("cfgAmmo " + info.GetAmmoType() + " simulation", simulation);
3191 if (simulation == "shotArrow")
3192 {
3193 string pile;
3194 GetGame().ConfigGetText("cfgAmmo " + info.GetAmmoType() + " spawnPileType", pile);
3195
3197 EntityAI ent = EntityAI.Cast(info.GetHitObj());
3198 if (ent)
3199 {
3200 EntityAI parent = ent.GetHierarchyParent();
3201 if (parent && parent.IsPlayer())
3202 {
3203 arrow = EntityAI.Cast(GetGame().CreateObjectEx(pile, parent.GetPosition(), ECE_DYNAMIC_PERSISTENCY));
3204 arrow.PlaceOnSurface();
3205 arrow.SetFromProjectile(info);
3206
3207 return;
3208 }
3209 }
3210
3211 vector pos = info.GetPos();
3212 vector dir = -info.GetInVelocity();
3213
3214 dir.Normalize();
3215 pos -= dir * ARROW_PIERCE_DEPTH;
3216
3218 arrow.SetDirection(dir);
3219 arrow.SetFromProjectile(info);
3220
3221 info.GetHitObj().AddArrow(arrow, info.GetComponentIndex(), info.GetHitObjPos(), info.GetHitObjRot());
3222 }
3223 }
const int ECE_KEEPHEIGHT
const float ARROW_PIERCE_DEPTH
Definition DayZGame.c:3158
proto float Normalize()
Normalizes vector. Returns length.

References ARROW_PIERCE_DEPTH, CreateObjectEx(), ECE_DYNAMIC_PERSISTENCY, ECE_KEEPHEIGHT, GetGame(), and vector::Normalize().

◆ OnProjectileStoppedInTerrain()

void CGame::OnProjectileStoppedInTerrain ( TerrainCollisionInfo info)
inlineprotected

Definition at line 3161 of file DayZGame.c.

3162 {
3163 string simulation;
3164
3165 if (info.GetIsWater())
3166 return;
3167
3168 GetGame().ConfigGetText("cfgAmmo " + info.GetAmmoType() + " simulation", simulation);
3169 if (simulation == "shotArrow")
3170 {
3171 string pile;
3172 GetGame().ConfigGetText("cfgAmmo " + info.GetAmmoType() + " spawnPileType", pile);
3173 vector pos = info.GetPos();
3174 vector dir = -info.GetInVelocity();
3175
3176 dir.Normalize();
3177 pos -= dir * ARROW_PIERCE_DEPTH;
3178
3180 arrow.SetDirection(dir);
3181 arrow.SetFromProjectile(info);
3182 }
3183 }

References ARROW_PIERCE_DEPTH, CreateObjectEx(), ECE_DYNAMIC_PERSISTENCY, ECE_KEEPHEIGHT, GetGame(), and vector::Normalize().

◆ OnRespawnEvent()

void CGame::OnRespawnEvent ( int time)
inlineprotected

Definition at line 1782 of file DayZGame.c.

1783 {
1784 // use login time screen for respawn timer
1785 if (time >= 0)
1786 {
1787 m_LoginTime = time;
1788 if (!m_LoginTimeScreen)
1789 {
1790 GetUIManager().CloseAll();
1791
1792 UIScriptedMenu parent = GetUIManager().GetMenu();
1793 EnterLoginTime(parent);
1794 }
1795
1796 m_LoginTimeScreen.SetRespawn(true);
1798 m_LoginTimeScreen.Show();
1799
1800 GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(this.LoginTimeCountdown, 1000, true);
1801 }
1802
1803 if (GetPlayer())
1804 GetPlayer().StopDeathDarkeningEffect();
1805
1806 PPERequesterBank.GetRequester(PPERequester_DeathDarkening).Start(new Param1<float>(1.0));
1807 }

References CALL_CATEGORY_SYSTEM, EnterLoginTime(), GetCallQueue(), GetPlayer(), and GetUIManager().

Referenced by OnEvent().

◆ OnRPC() [1/2]

override void CGame::OnRPC ( PlayerIdentity sender,
Object target,
int rpc_type,
ParamsReadContext ctx )
inlineprotected

Definition at line 2741 of file DayZGame.c.

2742 {
2743 super.OnRPC(sender, target, rpc_type, ctx);
2745
2746 //Print("["+ GetGame().GetTime().ToString() +"] => DayZGame::OnRPC = "+ EnumTools.EnumToString(ERPCs,rpc_type));
2747
2748 if (target)
2749 {
2750 // call rpc on target
2751 target.OnRPC(sender, rpc_type, ctx);
2752 }
2753 else
2754 {
2755 switch (rpc_type)
2756 {
2757#ifndef SERVER
2758#ifndef NO_GUI
2759 case ERPCs.RPC_CFG_GAMEPLAY_SYNC:
2760 {
2762 break;
2763 }
2764 case ERPCs.RPC_UNDERGROUND_SYNC:
2765 {
2767 break;
2768 }
2769 case ERPCs.RPC_SEND_NOTIFICATION:
2770 {
2771 NotificationType type;
2772 float show_time;
2773 string detail_text;
2774
2775 ctx.Read(type);
2776 ctx.Read(show_time);
2777 ctx.Read(detail_text);
2778
2780 break;
2781 }
2782 case ERPCs.RPC_SEND_NOTIFICATION_EXTENDED:
2783 {
2784 float show_time_ext;
2785 string title_text_ext;
2786 string detail_text_ext;
2787 string icon_ext;
2788
2789 ctx.Read(show_time_ext);
2790 ctx.Read(title_text_ext);
2791 ctx.Read(detail_text_ext);
2792 ctx.Read(icon_ext);
2793
2795 break;
2796 }
2797
2798
2799 case ERPCs.RPC_SOUND_HELICRASH:
2800 {
2801 bool playSound;
2802 vector pos;
2803 string sound_set;
2804
2805 //Helicrash is a world event, we want anyone to be able to hear it
2807 if (ctx.Read(playCrashSound))
2808 {
2809 playSound = playCrashSound.param1;
2810 pos = playCrashSound.param2;
2812 }
2813
2814 if (playSound)
2815 {
2817 m_CrashSound.SetAutodestroy(true);
2818 }
2819
2820 break;
2821 }
2822 //Random off map artillery barrage
2823 case ERPCs.RPC_SOUND_ARTILLERY:
2824 {
2827 if (ctx.Read(playArtySound))
2828 {
2829 position = playArtySound.param1;
2830 if (position == vector.Zero)
2831 break;
2832 }
2833 else
2834 break;
2835
2836 if (!GetGame().GetPlayer())
2837 break;
2838
2840 break;
2841
2842 m_ArtySound = SEffectManager.PlaySound("Artillery_Distant_Barrage_SoundSet", position, 0.1, 0.1);
2843 m_ArtySound.SetAutodestroy(true);
2844
2845 break;
2846 }
2847 case ERPCs.RPC_SOUND_CONTAMINATION:
2848 {
2850
2852 if (ctx.Read(playContaminatedSound))
2853 {
2855 if (soundPos == vector.Zero)
2856 break;
2857 }
2858 else
2859 break;
2860
2861 if (!GetGame().GetPlayer())
2862 break;
2863
2864 EffectSound closeArtySound = SEffectManager.PlaySound("Artillery_Close_SoundSet", soundPos);
2865 closeArtySound.SetAutodestroy(true);
2866
2867 // We add camera shake upon shell detonation
2870 {
2872 DayZPlayerCamera camera = GetGame().GetPlayer().GetCurrentCamera();
2873 if (camera)
2874 camera.SpawnCameraShake(strength_factor * 4);
2875 }
2876
2878 break;
2879 }
2880 // Single artillery shot to announce dynamic contaminated area
2881 case ERPCs.RPC_SOUND_ARTILLERY_SINGLE:
2882 {
2885 float soundDelay;
2886
2888 if (ctx.Read(playArtyShotSound))
2889 {
2893 if (soundPosition == vector.Zero)
2894 break;
2895 }
2896 else
2897 break;
2898
2899 if (!GetGame().GetPlayer())
2900 break;
2901
2902 m_ArtySound = SEffectManager.PlaySound("Artillery_Distant_SoundSet", soundPosition, 0.1, 0.1);
2903 m_ArtySound.SetAutodestroy(true);
2904
2905 // We remove the amount of time the incoming sound lasts
2906 soundDelay -= 5;
2907 // We convert to milliseconds
2908 soundDelay *= 1000;
2910 break;
2911 }
2912 case ERPCs.RPC_SET_BILLBOARDS:
2913 {
2916
2917 Param1<int> indexP = new Param1<int>(-1);
2918 if (ctx.Read(indexP))
2919 {
2920 int index = indexP.param1;
2921 m_BillboardSetHandler.OnRPCIndex(index);
2922 }
2923 break;
2924 }
2925#endif
2926#endif
2927
2928 case ERPCs.RPC_USER_SYNC_PERMISSIONS:
2929 {
2931 if (ctx.Read(mute_list))
2932 {
2933 for (int i = 0; i < mute_list.Count(); i++)
2934 {
2935 string uid = mute_list.GetKey(i);
2936 bool mute = mute_list.GetElement(i);
2937 MutePlayer(uid, sender.GetPlainId(), mute);
2938 }
2939 }
2940 break;
2941 }
2942
2943 /*
2944 case ERPCs.RPC_SERVER_RESPAWN_MODE:
2945 {
2946 int mode;
2947 if (ctx.Read(mode) && !IsServer())
2948 {
2949 GetMission().SetRespawnModeClient(mode);
2950 }
2951 }
2952 */
2953
2954#ifdef DEVELOPER
2955 case ERPCs.DEV_SET_WEATHER:
2956 {
2958
2959 if (ctx.Read(p1data))
2960 {
2962
2963 if (data.m_FogValue >= 0)
2964 GetGame().GetWeather().GetFog().Set(data.m_FogValue, data.m_FogInterpolation, data.m_FogDuration);
2965
2966 if (data.m_OvercastValue >= 0)
2967 GetGame().GetWeather().GetOvercast().Set(data.m_OvercastValue, data.m_OvercastInterpolation, data.m_OvercastDuration);
2968
2969 if (data.m_RainValue >= 0)
2970 GetGame().GetWeather().GetRain().Set(data.m_RainValue, data.m_RainInterpolation, data.m_RainDuration);
2971
2972 }
2973 else
2974 ErrorEx("Failed to read weather debug data");
2975 break;
2976 }
2977#endif
2978
2979
2980#ifdef DIAG_DEVELOPER
2981#ifdef SERVER
2982 case ERPCs.DIAG_CAMERATOOLS_CAM_DATA:
2983 {
2987 break;
2988 }
2989
2990 case ERPCs.DIAG_CAMERATOOLS_CAM_SUBSCRIBE:
2991 {
2995 break;
2996 }
2997
2998#endif
2999#endif
3000
3001 }
3002 // global rpc's handling
3003 }
3004 }
ERPCs
Definition ERPCs.c:2
ref EffectSound m_ArtySound
Definition DayZGame.c:936
void DelayedMidAirDetonation(float x, float y, float z)
Definition DayZGame.c:3006
proto native void MutePlayer(string muteUID, string playerUID, bool mute)
Mutes voice of source player to target player.
static ref ScriptInvoker Event_OnRPC
Definition DayZGame.c:925
ref EffectSound m_CrashSound
Definition DayZGame.c:933
const int MIN_ARTY_SOUND_RANGE
Definition DayZGame.c:937
static void OnRPC(Man player, ParamsReadContext ctx)
static string GetSoundSetByHash(int hash)
Definition DayZGame.c:53
static void AddNotificationExtended(float show_time, string title_text, string detail_text="", string icon="")
Send custom notification from to local player.
static const int CONTAMINATED_AREA_GAS_SHELL
static void OnRPC(ParamsReadContext ctx)
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
Definition dayzplayer.c:56
enum ShapeType ErrorEx
const int CAMERA_SHAKE_ARTILLERY_DISTANCE
Definition constants.c:846
const int CAMERA_SHAKE_ARTILLERY_DISTANCE2
Definition constants.c:847
static proto float Sqrt(float val)
Returns square root.

References NotificationSystem::AddNotification(), NotificationSystem::AddNotificationExtended(), CALL_CATEGORY_GAMEPLAY, GameConstants::CAMERA_SHAKE_ARTILLERY_DISTANCE, GameConstants::CAMERA_SHAKE_ARTILLERY_DISTANCE2, ParticleList::CONTAMINATED_AREA_GAS_SHELL, DayZPlayerCamera(), vector::DistanceSq(), ErrorEx, GetCallQueue(), GetGame(), GetPlayer(), GetPosition, CrashSoundSets::GetSoundSetByHash(), Math::InverseLerp(), MutePlayer(), CfgGameplayHandler::OnRPC(), UndergroundAreaLoader::OnRPC(), ParticleManager(), SEffectManager::PlaySound(), Math::Sqrt(), and vector::Zero.

◆ OnRPC() [2/2]

void CGame::OnRPC ( PlayerIdentity sender,
Object target,
int rpc_type,
ParamsReadContext ctx )
inlineprivate

Called after remote procedure call is recieved for this object.

Parameters
targetobject on which remote procedure is called, when NULL, RPC is evaluated by CGame as global
rpc_typeuser defined identification of RPC
ctxread context for params

Definition at line 199 of file Game.c.

200 {
201 }

◆ OnUpdate() [1/2]

override void CGame::OnUpdate ( bool doSim,
float timeslice )
inlineprotected

Definition at line 2649 of file DayZGame.c.

2650 {
2652
2654 bool gameIsRunning = false;
2655
2656 if (doSim && mission && !mission.IsPaused())
2657 gameIsRunning = true;
2658
2659 if (doSim && mission)
2661
2662 // queues and timers update
2666
2667#ifndef NO_GUI
2668 if (m_IsConnecting)
2670
2671 if (m_loading && m_loading.IsLoading())
2672 m_loading.OnUpdate(timeslice);
2673 else if (m_LoginTimeScreen && m_LoginTimeScreen.IsStatic())
2675 else
2676 {
2680 GetDragQueue().Tick();
2681 }
2682
2684 if (m_Notifications)
2685 m_Notifications.Update(timeslice);
2686
2687#ifndef SERVER
2688#ifdef DIAG_DEVELOPER
2689 if (GetGame().IsMultiplayer() && GetPlayer() && DiagMenu.GetBool(DiagMenuIDs.MISC_CONNECTION_STATS))
2690 {
2691 PlayerIdentity playerIdentity = GetPlayer().GetIdentity();
2692
2693 if (playerIdentity)
2694 {
2695 int pingAct = playerIdentity.GetPingAct();
2696 int pingAvg = playerIdentity.GetPingAvg();
2697 }
2698
2700 }
2701#endif
2702#endif
2703
2704#endif
2705
2706 if (gameIsRunning)
2707 {
2711 }
2712 }
DiagMenuIDs
Definition EDiagMenuIDs.c:2
void UpdateLoginQueue(float timeslice)
Definition DayZGame.c:1695
proto native bool IsMultiplayer()
override DragQueue GetDragQueue()
Definition DayZGame.c:1149
override ScriptInvoker GetUpdateQueue(int call_category)
Definition DayZGame.c:1134
override TimerQueue GetTimerQueue(int call_category)
Definition DayZGame.c:1144
void OnUpdate(float timeslice)
Definition gameplay.c:684
static void Update(float timeslice)
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.

References CALL_CATEGORY_GAMEPLAY, CALL_CATEGORY_GUI, CALL_CATEGORY_SYSTEM, DiagMenu::GetBool(), GetCallQueue(), GetDragQueue(), GetGame(), GetMission(), GetPlayer(), GetTimerQueue(), GetUpdateQueue(), IsMultiplayer(), Mission::IsPaused(), mission, Mission::OnUpdate(), NotificationSystem::Update(), and UpdateLoginQueue().

◆ OnUpdate() [2/2]

void CGame::OnUpdate ( bool doSim,
float timeslice )
inlineprivate

Called on World update.

Parameters
doSimFalse when simulation is paused, True otherwise
timeslicetime elapsed from last call

Definition at line 138 of file Game.c.

139 {
140 }

◆ OpenURL()

proto native void CGame::OpenURL ( string url)
protected

◆ OverrideDOF()

proto native void CGame::OverrideDOF ( bool enable,
float focusDistance,
float focusLength,
float focusLengthNear,
float blur,
float focusDepthOffset )
protected

◆ OverrideInventoryLights()

proto native void CGame::OverrideInventoryLights ( vector diffuse,
vector ambient,
vector ground,
vector dir )
protected

override inventory light

Parameters
diffusedirectional light
ambientambient light
groundground light
dirdirection of light, Vector(0,0,1) is from camera

◆ PartyLaunch()

void CGame::PartyLaunch ( )
inlineprotected

Definition at line 2082 of file DayZGame.c.

2083 {
2085 SetLoadState(DayZLoadState.PARTY_START);
2086 BiosUserManager user_manager = GetGame().GetUserManager();
2087
2088 string param;
2089 if (GetCLIParam("party", param))
2090 {
2091 user_manager.ParsePartyAsync(param);
2093 }
2094 }

References GetCLIParam(), GetGame(), GetMainMenuWorld(), SetGameState(), SetLoadState(), and StartRandomCutscene().

Referenced by OnInitialize().

◆ PlayMission()

proto native void CGame::PlayMission ( string path)
private

Starts mission (equivalent for SQF playMission). You MUST use double slash \.

Referenced by MissionLaunch(), and SelectGamepad().

◆ PreloadObject()

proto native bool CGame::PreloadObject ( string type,
float distance )
private

Preload objects with certain type in certain distance from camera.

Parameters
typeof objects which should be preloaded
distancefrom camera in which objects should be preloaded
Returns
true on success

◆ ProfilerStart()

proto native void CGame::ProfilerStart ( string name)
private

Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler.

◆ ProfilerStop()

proto native void CGame::ProfilerStop ( string name)
private

Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler.

◆ RefreshCurrentServerInfo()

void CGame::RefreshCurrentServerInfo ( )
inlineprotected

Definition at line 2444 of file DayZGame.c.

2445 {
2446 string addr;
2447 int port;
2448 if (GetHostAddress(addr, port))
2449 {
2452 }
2454 }
static void GetCurrentServerInfo(string ip, int port)

References OnlineServices::GetCurrentServerInfo(), and GetHostAddress().

◆ RefreshMouseCursorVisibility()

void CGame::RefreshMouseCursorVisibility ( )
inlineprotected

Handles app active-ness

Fallback, just in-case

Definition at line 3490 of file DayZGame.c.

3491 {
3492#ifndef NO_GUI
3493#ifdef FEATURE_CURSOR
3494 if (!IsAppActive())
3495 ShowCursorWidget(true);
3496 else
3497#endif
3498 {
3500
3502 if (ui)
3503 {
3505 ui.ShowCursor(showCursor);
3506 }
3507 else
3508 {
3511 }
3512 }
3513#endif
3514 }
bool CanDisplayMouseCursor()
extend as needed, only game focus and M&K setting (consoles only!) are checked natively
Definition DayZGame.c:3474
proto native bool IsAppActive()
Returns if the application is focused on PC, returns true always on console.
proto native void ShowCursorWidget(bool show)
direct mouse cursor visibility control

References CanDisplayMouseCursor(), GetUIManager(), IsAppActive(), and ShowCursorWidget().

Referenced by DayZGame(), OnActivateMessage(), OnDeactivateMessage(), and SetMouseCursorDesiredVisibility().

◆ RegisterNetworkStaticObject()

proto native bool CGame::RegisterNetworkStaticObject ( Object object)
private

Static objects cannot be replicated by default (there are too many objects on the map). Use this method when you want to replicate some scripted variables. Cannot be called in object's constructor, because networking is not initialized yet.

Parameters
objectstatic object to replicate
Returns
false, if registration wasn't successful or when object is already registered

◆ RegisterProfilesOptions()

void CGame::RegisterProfilesOptions ( )
inlineprivate

Definition at line 1077 of file DayZGame.c.

1078 {
1079 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.CROSSHAIR, SHOW_CROSSHAIR);
1080 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.HUD, SHOW_HUD);
1081 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.QUICKBAR, SHOW_QUICKBAR);
1082 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.SERVER_MESSAGES, SYSTEM_CHAT_MSG);
1083 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.USERS_CHAT, DIRECT_CHAT_MSG);
1084 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.RADIO_CHAT, RADIO_CHAT_MSG);
1085 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.GAME_MESSAGES, GAME_CHAT_MSG, false);
1086 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.ADMIN_MESSAGES, ADMIN_CHAT_MSG, false);
1087 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.PLAYER_MESSAGES, PLAYER_CHAT_MSG, false);
1088 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.SERVERINFO_DISPLAY, SHOW_SERVERINFO, true);
1089 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.BLEEDINGINDICATION, ENABLE_BLEEDINGINDICATION, true);
1090 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.CONNECTIVITY_INFO, SHOW_CONNECTIVITYINFO, true);
1091
1092 m_DayZProfileOptions.RegisterProfileOptionFloat(EDayZProfilesOptions.HUD_BRIGHTNESS, HUD_BRIGHTNESS, 0.0);
1093 }
const string GAME_CHAT_MSG
Definition constants.c:544
const string SYSTEM_CHAT_MSG
Definition constants.c:539
const string RADIO_CHAT_MSG
Definition constants.c:543
const string PLAYER_CHAT_MSG
Definition constants.c:546
const string DIRECT_CHAT_MSG
Definition constants.c:541
const string ADMIN_CHAT_MSG
Definition constants.c:545
const string SHOW_QUICKBAR
Definition constants.c:554
const string SHOW_SERVERINFO
Definition constants.c:561
const string SHOW_HUD
Definition constants.c:555
const string SHOW_CONNECTIVITYINFO
Definition constants.c:558
const string HUD_BRIGHTNESS
Definition constants.c:556
const string ENABLE_BLEEDINGINDICATION
Definition constants.c:557
const string SHOW_CROSSHAIR
Definition constants.c:560

References ADMIN_CHAT_MSG, DIRECT_CHAT_MSG, ENABLE_BLEEDINGINDICATION, GAME_CHAT_MSG, HUD_BRIGHTNESS, PLAYER_CHAT_MSG, RADIO_CHAT_MSG, SHOW_CONNECTIVITYINFO, SHOW_CROSSHAIR, SHOW_HUD, SHOW_QUICKBAR, SHOW_SERVERINFO, and SYSTEM_CHAT_MSG.

Referenced by OnInitialize().

◆ ReloadMission()

void CGame::ReloadMission ( )
inlineprivate

Definition at line 1312 of file DayZGame.c.

1313 {
1314#ifdef DEVELOPER
1315 Print("Reloading mission module!");
1317#endif
1318 }
native void CreateMission(string path)
Create only enforce script mission, used for mission script reloading.

References CreateMission(), and Print().

◆ RemoteObjectCreate()

proto native void CGame::RemoteObjectCreate ( Object obj)
private

RemoteObjectDelete - deletes only remote object tree (unregisters from network). do not use if not sure what you do.

◆ RemoteObjectDelete()

proto native void CGame::RemoteObjectDelete ( Object obj)
private

◆ RemoteObjectTreeCreate()

proto native void CGame::RemoteObjectTreeCreate ( Object obj)
private

RemoteObjectCreate - postponed registration of network object (and creation of remote object). do not use if not sure what you do.

◆ RemoteObjectTreeDelete()

proto native void CGame::RemoteObjectTreeDelete ( Object obj)
private

RemoteObjectDelete - deletes only remote object (unregisters from network). do not use if not sure what you do.

◆ RemoveFromReconnectCache()

proto native void CGame::RemoveFromReconnectCache ( string uid)
private

Remove player from reconnect cache.

Note
Works only on server
Parameters
uidof the player

◆ RemoveVoiceNotification()

void CGame::RemoveVoiceNotification ( VONStopSpeakingEventParams vonStopParams)
inlineprotected

Definition at line 1689 of file DayZGame.c.

1690 {
1691 m_Notifications.RemoveVoiceNotification(vonStopParams.param2);
1692 }

◆ ReportModded()

static bool CGame::ReportModded ( )
inlinestaticprivate

Definition at line 1269 of file DayZGame.c.

1270 {
1271 return m_ReportModded;
1272 }

References m_ReportModded.

◆ RequestExit()

proto native void CGame::RequestExit ( int code)
private

Sets exit code and quits in the right moment.

Referenced by OnKeyPress().

◆ RequestRestart()

proto native void CGame::RequestRestart ( int code)
private

Sets exit code and restart in the right moment.

◆ ResetPPMask()

proto native void CGame::ResetPPMask ( )
protected

◆ ResetProfileOptions()

void CGame::ResetProfileOptions ( )
inlineprivate

Definition at line 1095 of file DayZGame.c.

1096 {
1097 m_DayZProfileOptions.ResetOptionsBool();
1098 m_DayZProfileOptions.ResetOptionsInt();
1099 m_DayZProfileOptions.ResetOptionsFloat();
1100 }

Referenced by SelectGamepad().

◆ RespawnPlayer()

proto native void CGame::RespawnPlayer ( )
protected

◆ RestartMission()

proto native void CGame::RestartMission ( )
protected

◆ RPC()

proto native void CGame::RPC ( Object target,
int rpcType,
notnull array< ref Param > params,
bool guaranteed,
PlayerIdentity recipient = null )
private

Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on server, RPC is executed on all clients.

Parameters
targetobject on which remote procedure is called, when NULL, RPC is evaluated by CGame as global
rpc_typeuser defined identification of RPC
paramscustom params array
recipientspecified client to send RPC to. If NULL, RPC will be send to all clients (specifying recipient increase security and decrease network traffic)
...
// on server side, after blood pressure of player is low...
Param1<float> p = new Param1<float>(m_blood_pressure);
params.Insert(p);
// or shortcut
...
// on client
{
// override OnRPC function
{
// dont forget to propagate this call trough class hierarchy!
super.OnRPC(rpc_type, ctx);
switch(rpc_type)
{
if (ctx.Read(p))
{
float blood_pressure = p.param1;
}
break;
}
}
}
override void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
Definition DayZGame.c:2741
Serialization general interface. Serializer API works with:
Definition Serializer.c:56

Referenced by RPCSingleParam().

◆ RPCSelf()

proto native void CGame::RPCSelf ( Object target,
int rpcType,
notnull array< ref Param > params )
private

Not actually an RPC, as it will send it only to yourself.

Referenced by RPCSelfSingleParam().

◆ RPCSelfSingleParam()

void CGame::RPCSelfSingleParam ( Object target,
int rpcType,
Param param )
inlineprivate

Definition at line 888 of file Game.c.

889 {
890 m_ParamCache.Set(0, param);
892 }
proto native void RPCSelf(Object target, int rpcType, notnull array< ref Param > params)
Not actually an RPC, as it will send it only to yourself.

References m_ParamCache, and RPCSelf().

◆ RPCSingleParam()

void CGame::RPCSingleParam ( Object target,
int rpc_type,
Param param,
bool guaranteed,
PlayerIdentity recipient = null )
inlineprivate

see CGame.RPC

Definition at line 881 of file Game.c.

882 {
883 m_ParamCache.Set(0, param);
885 }
proto native void RPC(Object target, int rpcType, notnull array< ref Param > params, bool guaranteed, PlayerIdentity recipient=null)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...

References m_ParamCache, and RPC().

◆ SaveProfile()

proto native void CGame::SaveProfile ( )
private

Saves profile on disk.

Referenced by AddVisitedServer().

◆ SaveVersion()

proto native int CGame::SaveVersion ( )
private

Returns actual storage version - saving.

◆ ScriptTest()

proto native bool CGame::ScriptTest ( )
private

◆ SelectGamepad()

void CGame::SelectGamepad ( )
inlineprotected

Definition at line 2276 of file DayZGame.c.

2277 {
2280
2281 if (user_manager)
2282 {
2283 BiosUser selected_user = user_manager.GetSelectedUser();
2284 if (selected_user)
2285 {
2287 SetPlayerName(selected_user.GetName());
2289#ifdef PLATFORM_CONSOLE
2291 user_manager.GetUserDatabaseIdAsync();
2292#endif
2293 }
2294
2295 if (GetUIManager().GetMenu())
2296 GetUIManager().GetMenu().Refresh();
2297 }
2298
2299 switch (GetLoadState())
2300 {
2301 case DayZLoadState.JOIN_USER_SELECT:
2302 {
2303 SetLoadState(DayZLoadState.JOIN_CONTROLLER_SELECT);
2305 break;
2306 }
2307 case DayZLoadState.PARTY_USER_SELECT:
2308 {
2309 SetLoadState(DayZLoadState.PARTY_CONTROLLER_SELECT);
2311 GetUIManager().EnterScriptedMenu(MENU_SERVER_BROWSER, GetUIManager().GetMenu());
2312 break;
2313 }
2314 case DayZLoadState.CONNECT_USER_SELECT:
2315 {
2316 SetLoadState(DayZLoadState.CONNECT_CONTROLLER_SELECT);
2318 break;
2319 }
2320 case DayZLoadState.MAIN_MENU_USER_SELECT:
2321 {
2322 SetLoadState(DayZLoadState.MAIN_MENU_CONTROLLER_SELECT);
2324 GetUIManager().EnterScriptedMenu(MENU_MAIN, GetUIManager().GetMenu());
2325 break;
2326 }
2327 case DayZLoadState.MISSION_USER_SELECT:
2328 {
2329 SetLoadState(DayZLoadState.MISSION_CONTROLLER_SELECT);
2331 string mission;
2332 GetCLIParam("mission", mission);
2334 break;
2335 }
2336 }
2337 }
void ResetProfileOptions()
Definition DayZGame.c:1095
proto native void SetPlayerName(string name)
Sets current player name.
void SetPlayerGameName(string name)
Definition DayZGame.c:3315
void SetUserFOV(float pFov)
Definition DayZGame.c:3335
static void SetBiosUser(BiosUser user)
const int MENU_MAIN
Definition constants.c:172
const int MENU_SERVER_BROWSER
Definition constants.c:190

References DeleteTitleScreen(), GetCLIParam(), GetLoadState(), GetUIManager(), GetUserFOVFromConfig(), GetUserManager(), OnlineServices::LoadMPPrivilege(), MENU_MAIN, MENU_SERVER_BROWSER, mission, PlayMission(), ResetProfileOptions(), OnlineServices::SetBiosUser(), SetLoadState(), SetPlayerGameName(), SetPlayerName(), and SetUserFOV().

Referenced by SelectUser().

◆ SelectPlayer()

proto native void CGame::SelectPlayer ( PlayerIdentity identity,
Object player )
private

Selects player's controlled object.

Parameters
identityidentity used in MP (use NULL in singleplayer)
playerobject which should be controlled by player
Note
We can use only instances of DayZPlayer now

◆ SelectSpectator()

proto native void CGame::SelectSpectator ( PlayerIdentity identity,
string spectatorObjType,
vector position )
private

Creates spectator object (mostly cameras)

Parameters
identityidentity used in MP (use NULL in singleplayer)
spectatorObjTypeclassname for spectator object (like cameras)
positionwhere to create spectator instance

◆ SelectUser()

void CGame::SelectUser ( int gamepad = -1)
inlineprotected

Definition at line 2141 of file DayZGame.c.

2142 {
2144 if (user_manager)
2145 {
2147 if (gamepad > -1)
2148 {
2149 GetInput().GetGamepadUser(gamepad, selected_user);
2150#ifdef PLATFORM_PS4
2151 if (selected_user)
2152#endif
2153 {
2154 if (user_manager.SelectUserEx(selected_user))
2155 {
2156 GetGame().GetInput().IdentifyGamepad(GamepadButton.BUTTON_NONE);
2157 GetInput().SelectActiveGamepad(gamepad);
2158 }
2159 else
2160 selected_user = user_manager.GetSelectedUser();
2161
2162#ifdef PLATFORM_PS4
2163 if (!selected_user.IsOnline())
2164 {
2165 user_manager.LogOnUserAsync(selected_user);
2166 return;
2167 }
2168#endif
2169 }
2170#ifdef PLATFORM_PS4
2171 else
2172 {
2173 GetInput().ResetActiveGamepad();
2174 GamepadCheck();
2175 }
2176#endif
2177 }
2178
2179 if (!selected_user)
2180 selected_user = user_manager.GetSelectedUser();
2181
2182 if (!selected_user)
2183 {
2184 user_manager.PickUserAsync();
2185 return;
2186 }
2187
2188 user_manager.SelectUserEx(selected_user);
2189
2190 switch (GetLoadState())
2191 {
2192 case DayZLoadState.JOIN_START:
2193 {
2194 SetLoadState(DayZLoadState.JOIN_USER_SELECT);
2195 break;
2196 }
2197 case DayZLoadState.PARTY_START:
2198 {
2199 SetLoadState(DayZLoadState.PARTY_USER_SELECT);
2200 break;
2201 }
2202 case DayZLoadState.MAIN_MENU_START:
2203 {
2204 SetLoadState(DayZLoadState.MAIN_MENU_USER_SELECT);
2205 break;
2206 }
2207 case DayZLoadState.CONNECT_START:
2208 {
2209 SetLoadState(DayZLoadState.CONNECT_USER_SELECT);
2210 break;
2211 }
2212 case DayZLoadState.MISSION_START:
2213 {
2214 SetLoadState(DayZLoadState.MISSION_USER_SELECT);
2215 break;
2216 }
2217 default:
2218 break;
2219 }
2220
2221 SelectGamepad();
2222 g_Game.SetHudBrightness(g_Game.GetHUDBrightnessSetting());
2223 }
2224 }
void SelectGamepad()
Definition DayZGame.c:2276

References g_Game, GamepadCheck(), GetGame(), GetInput(), GetLoadState(), GetUserManager(), SelectGamepad(), and SetLoadState().

Referenced by GamepadCheck().

◆ SendLogoutTime()

proto native void CGame::SendLogoutTime ( Object player,
int time )
private

Inform client about logout time (creates logout screen on specified client)

Note
Works only on server
Parameters
playerobject which is logging out
timelength of logout

◆ ServerConfigGetInt()

proto native int CGame::ServerConfigGetInt ( string name)
protected

Server config parsing. Returns 0 if not found.

◆ SetConnecting()

void CGame::SetConnecting ( bool value)
inlineprotected

Returns true when connecting to server.

Definition at line 3026 of file DayZGame.c.

3027 {
3029 }

Referenced by Connect(), and OnEvent().

◆ SetConnectivityStatState()

void CGame::SetConnectivityStatState ( EConnectivityStatType type,
EConnectivityStatLevel level )
inlineprotected

Definition at line 1632 of file DayZGame.c.

1633 {
1634 if (level != m_ConnectivityStatsStates[type])
1635 {
1636 if (OnConnectivityStatChange(type, level, m_ConnectivityStatsStates[type]))//before setting the prev. level to be the current level, we need to make sure we successfully set the icon
1638 }
1639 }
bool OnConnectivityStatChange(EConnectivityStatType type, EConnectivityStatLevel newLevel, EConnectivityStatLevel oldLevel)
Definition DayZGame.c:1641

References OnConnectivityStatChange().

Referenced by OnEvent(), and OnMPConnectionLostEvent().

◆ SetDatabaseID()

void CGame::SetDatabaseID ( string id)
inlineprotected

Definition at line 1982 of file DayZGame.c.

1983 {
1984 m_DatabaseID = id;
1985 if (GetUIManager().GetMenu())
1986 GetUIManager().GetMenu().Refresh();
1987 }

References GetUIManager().

◆ SetDebugMonitorEnabled()

void CGame::SetDebugMonitorEnabled ( int value)
inlineprotected

Definition at line 1021 of file Game.c.

1022 {
1024 }

References m_DebugMonitorEnabled.

◆ SetDiagDrawMode()

proto native void CGame::SetDiagDrawMode ( int diag_draw_mode)
private

Set debug draw mode.

◆ SetDiagModeEnable()

proto native void CGame::SetDiagModeEnable ( int diag_mode,
bool enabled )
private

Set specific debug mode.

◆ SetEVUser()

proto native void CGame::SetEVUser ( float value)
protected

Sets custom camera camera EV. range: -50.0..50.0? //TODO.

Referenced by SetEVValue().

◆ SetEVValue()

void CGame::SetEVValue ( float value)
inlineprotected

Definition at line 3405 of file DayZGame.c.

3406 {
3409 m_EVValue = value;
3410 }
proto native void SetEVUser(float value)
Sets custom camera camera EV. range: -50.0..50.0? //TODO.

References m_EVValue, and SetEVUser().

◆ SetGameState()

void CGame::SetGameState ( DayZGameState state)
inlineprivate

◆ SetHudBrightness()

void CGame::SetHudBrightness ( float value)
inlineprotected

Definition at line 3376 of file DayZGame.c.

3377 {
3378 Widget.SetLV(value);
3379 Widget.SetTextLV(value);
3380 }

Referenced by OnInitialize().

◆ SetKeyboardHandle()

void CGame::SetKeyboardHandle ( UIScriptedMenu handler)
inlineprotected

Definition at line 3043 of file DayZGame.c.

3044 {
3046 }

◆ SetLoadState()

void CGame::SetLoadState ( DayZLoadState state)
inlineprivate

◆ SetLoginTimerFinished()

proto native void CGame::SetLoginTimerFinished ( )
protected

◆ SetMainMenuWorld()

proto native void CGame::SetMainMenuWorld ( string world)
protected

Referenced by DayZGame().

◆ SetMission()

proto native void CGame::SetMission ( Mission mission)
private

◆ SetMissionPath()

void CGame::SetMissionPath ( string path)
inlineprivate

Called from C++.

Definition at line 1103 of file DayZGame.c.

1104 {
1106
1107 int pos_end = 0;
1108 int pos_cur = 0;
1109
1110 while (pos_cur != -1)
1111 {
1112 pos_end = pos_cur;
1113 pos_cur = path.IndexOfFrom(pos_cur + 1, "\\");
1114 }
1115
1117 }
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOfFrom(int start, string sample)
Finds 'sample' in 'str' from 'start' position. Returns -1 when not found.

References string::IndexOfFrom(), path, and string::Substring().

◆ SetMissionState()

void CGame::SetMissionState ( int state)
inlineprivate

Definition at line 1168 of file DayZGame.c.

1169 {
1171 }

◆ SetMouseCursorDesiredVisibility()

void CGame::SetMouseCursorDesiredVisibility ( bool visible)
inlineprotected

Definition at line 3461 of file DayZGame.c.

References RefreshMouseCursorVisibility().

◆ SetNewCharacter()

void CGame::SetNewCharacter ( bool state)
inlineprotected

Definition at line 3325 of file DayZGame.c.

3326 {
3328 }

◆ SetPlayerGameName()

void CGame::SetPlayerGameName ( string name)
inlineprotected

Definition at line 3315 of file DayZGame.c.

3316 {
3318 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo

References name.

Referenced by SelectGamepad().

◆ SetPlayerName()

proto native void CGame::SetPlayerName ( string name)
private

Sets current player name.

Parameters
name

Referenced by SelectGamepad().

◆ SetPreviousGamepad()

void CGame::SetPreviousGamepad ( int gamepad)
inlineprotected

Definition at line 2226 of file DayZGame.c.

2227 {
2229 }

◆ SetProfileOption()

void CGame::SetProfileOption ( EDayZProfilesOptions option,
bool value )
inlineprivate

Definition at line 1214 of file DayZGame.c.

1215 {
1216 m_DayZProfileOptions.SetProfileOptionBool(option, value);
1217 }

Referenced by SetProfileOptionBool().

◆ SetProfileOptionBool()

void CGame::SetProfileOptionBool ( EDayZProfilesOptions option,
bool value )
inlineprivate

Definition at line 1219 of file DayZGame.c.

1220 {
1222 }
void SetProfileOption(EDayZProfilesOptions option, bool value)
Definition DayZGame.c:1214

References SetProfileOption().

◆ SetProfileOptionFloat()

void CGame::SetProfileOptionFloat ( EDayZProfilesOptions option,
float value )
inlineprivate

Definition at line 1229 of file DayZGame.c.

1230 {
1231 m_DayZProfileOptions.SetProfileOptionFloat(option, value);
1232 }

◆ SetProfileOptionInt()

void CGame::SetProfileOptionInt ( EDayZProfilesOptions option,
int value )
inlineprivate

Definition at line 1224 of file DayZGame.c.

1225 {
1226 m_DayZProfileOptions.SetProfileOptionInt(option, value);
1227 }

◆ SetProfileString()

proto native void CGame::SetProfileString ( string name,
string value )
private

Sets string to profile variable.

Parameters
nameof the variable
valueto set

◆ SetProfileStringList()

proto native void CGame::SetProfileStringList ( string name,
TStringArray values )
private

Sets array of strings to profile variable.

Parameters
nameof the variable
valuesto set

Referenced by AddVisitedServer().

◆ SetUserFOV()

void CGame::SetUserFOV ( float pFov)
inlineprotected

Definition at line 3335 of file DayZGame.c.

Referenced by SelectGamepad().

◆ SetVoiceEffect()

proto native void CGame::SetVoiceEffect ( Object player,
int effect,
bool enable )
private

Enable/disable VoN effect (only on server)

Parameters
playerin question
voiceeffect (VoiceEffectMumbling = 1, VoiceEffectExtortion = 2, VoiceEffectObstruction = 4)
enableor disable effect

◆ SetVoiceLevel()

proto native void CGame::SetVoiceLevel ( int level)
private

Set voice level of VoN (only on client) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)

Parameters
levelof voice

◆ ShouldShowControllerDisconnect()

bool CGame::ShouldShowControllerDisconnect ( )
inlineprotected

Definition at line 2031 of file DayZGame.c.

2032 {
2034 }
bool m_ShouldShowControllerDisconnect
Definition DayZGame.c:903

References m_ShouldShowControllerDisconnect.

◆ StartRandomCutscene()

proto native void CGame::StartRandomCutscene ( string world)
private

Starts intro.

Referenced by MainMenuLaunch(), and PartyLaunch().

◆ StorageVersion()

proto native void CGame::StorageVersion ( int iVersion)
private

Set actual storage version - for next save.

Referenced by CGame().

◆ StoreLoginData()

proto native void CGame::StoreLoginData ( ParamsWriteContext ctx)
private

Stores login userdata as parameters which are sent to server.

Referenced by StoreLoginDataPrepare().

◆ StoreLoginDataPrepare()

void CGame::StoreLoginDataPrepare ( )
inlineprotected

Definition at line 1822 of file DayZGame.c.

1823 {
1825
1826 //GetMenuData().RequestGetDefaultCharacterData();
1828 StoreLoginData(ctx.GetWriteContext());
1829 }
proto native void StoreLoginData(ParamsWriteContext ctx)
Stores login userdata as parameters which are sent to server.
void SerializeCharacterData(ParamsWriteContext ctx)
serializes data into a param array to be used by "StoreLoginData(notnull array<ref Param> params);"
Definition gameplay.c:1029

References GetMenuDefaultCharacterData(), MenuDefaultCharacterData::SerializeCharacterData(), and StoreLoginData().

Referenced by OnPreloadEvent().

◆ SurfaceGetNoiseMultiplier()

proto native float CGame::SurfaceGetNoiseMultiplier ( Object directHit,
vector pos,
int componentIndex )
protected

◆ SurfaceGetNormal()

proto native vector CGame::SurfaceGetNormal ( float x,
float z )
protected

◆ SurfaceGetSeaLevel()

proto native float CGame::SurfaceGetSeaLevel ( )
protected

◆ SurfaceGetType()

proto void CGame::SurfaceGetType ( float x,
float z,
out string type )
protected

◆ SurfaceGetType3D()

proto void CGame::SurfaceGetType3D ( float x,
float y,
float z,
out string type )
protected

◆ SurfaceIsPond()

proto native bool CGame::SurfaceIsPond ( float x,
float z )
protected

◆ SurfaceIsSea()

proto native bool CGame::SurfaceIsSea ( float x,
float z )
protected

◆ SurfaceRoadY()

proto native float CGame::SurfaceRoadY ( float x,
float z,
RoadSurfaceDetection rsd = RoadSurfaceDetection.LEGACY )
protected

◆ SurfaceRoadY3D()

proto native float CGame::SurfaceRoadY3D ( float x,
float y,
float z,
RoadSurfaceDetection rsd )
protected

◆ SurfaceUnderObject()

proto void CGame::SurfaceUnderObject ( notnull Object object,
out string type,
out int liquidType )
protected

◆ SurfaceUnderObjectByBone()

proto void CGame::SurfaceUnderObjectByBone ( notnull Object object,
int boneType,
out string type,
out int liquidType )
protected

◆ SurfaceUnderObjectEx()

proto void CGame::SurfaceUnderObjectEx ( notnull Object object,
out string type,
out string impact,
out int liquidType )
protected

◆ SurfaceY()

proto native float CGame::SurfaceY ( float x,
float z )
protected

◆ TryConnect()

void CGame::TryConnect ( )
inlineprotected

Definition at line 2339 of file DayZGame.c.

2340 {
2341 if (GetLoadState() == DayZLoadState.JOIN_CONTROLLER_SELECT)
2342 {
2343 SetGameState(DayZGameState.CONNECTING);
2345 }
2346 else
2347 {
2348 if (GetGameState() != DayZGameState.CONNECTING)
2349 {
2350 switch (GetLoadState())
2351 {
2352 case DayZLoadState.CONNECT_CONTROLLER_SELECT:
2353 {
2354 SetGameState(DayZGameState.CONNECTING);
2356 break;
2357 }
2358 case DayZLoadState.PARTY_CONTROLLER_SELECT:
2359 {
2360 SetGameState(DayZGameState.CONNECTING);
2361 Connect();
2362 break;
2363 }
2364 case DayZLoadState.MAIN_MENU_CONTROLLER_SELECT:
2365 {
2366 SetGameState(DayZGameState.CONNECTING);
2367 Connect();
2368 break;
2369 }
2370 }
2371 }
2372 else
2373 {
2374 string address;
2375 int port;
2377 {
2379 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING_THIS);
2380 else
2381 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING, string.Format("%1:%2", address, port));
2382 }
2383 else
2384 {
2387 TryConnect();
2388 }
2389 }
2390 }
2391 }
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
void TryConnect()
Definition DayZGame.c:2339
static proto int ThrowError(ErrorCategory category, int code, string additionalInfo="")
Creates and throws the error code, sending it to the handler of the category.
static void GetSession()

References Connect(), ConnectFromCLI(), DisconnectSessionForce(), DisconnectSessionScript(), GetGameState(), GetHostAddress(), GetLoadState(), OnlineServices::GetSession(), SetGameState(), ErrorModuleHandler::ThrowError(), and TryConnect().

Referenced by TryConnect().

◆ UpdateInputDeviceDisconnectWarning()

void CGame::UpdateInputDeviceDisconnectWarning ( )
inlineprotected

Definition at line 2036 of file DayZGame.c.

2037 {
2038#ifdef PLATFORM_CONSOLE
2040 {
2041 m_ShouldShowControllerDisconnect = !GetInput().AreAllAllowedInputDevicesActive();
2044 }
2045#endif
2046 }
const int MENU_WARNING_INPUTDEVICE_DISCONNECT
Definition constants.c:202

References CALL_CATEGORY_GUI, GetCallQueue(), GetInput(), GetUIManager(), and MENU_WARNING_INPUTDEVICE_DISCONNECT.

Referenced by LoadingHide(), and OnEvent().

◆ UpdateLoginQueue()

void CGame::UpdateLoginQueue ( float timeslice)
inlineprotected

Display login queue position dialog

manually update static login queue dialog

Definition at line 1695 of file DayZGame.c.

1696 {
1697 int pos = GetUIManager().GetLoginQueuePosition();
1698
1700 if (!m_LoginQueue && pos > 0)
1701 {
1702 GetUIManager().CloseAll();
1703
1704 if (GetMission())
1705 {
1706 UIScriptedMenu parent = GetUIManager().GetMenu();
1707 EnterLoginQueue(parent);
1708 }
1709 else
1710 {
1711 m_LoginQueue = new LoginQueueStatic();
1712 GetUIManager().ShowScriptedMenu(m_LoginQueue, null);
1713 }
1714 }
1715 if (m_LoginQueue)
1716 {
1717 m_LoginQueue.SetPosition(pos);
1718
1720 LoginQueueStatic loginQueue;
1722 loginQueue.Update(timeslice);
1723 }
1724 }
void EnterLoginQueue(UIMenuPanel parent)
Definition DayZGame.c:1832

References EnterLoginQueue(), GetMission(), and GetUIManager().

Referenced by OnUpdate().

◆ UpdatePathgraphRegion()

proto native void CGame::UpdatePathgraphRegion ( vector regionMin,
vector regionMax )
protected

◆ UpdatePathgraphRegionByObject()

void CGame::UpdatePathgraphRegionByObject ( Object object)
inlineprotected

Definition at line 1099 of file Game.c.

1100 {
1101 if (object)
1102 {
1103 vector pos = object.GetPosition();
1104 vector min_max[2];
1105 float radius = object.ClippingInfo(min_max);
1106 vector min = Vector(pos[0] - radius, pos[1], pos[2] - radius);
1107 vector max = Vector(pos[0] + radius, pos[1], pos[2] + radius);
1109 }
1110 }
proto native void UpdatePathgraphRegion(vector regionMin, vector regionMax)

References UpdatePathgraphRegion(), and Vector().

◆ UpdateSpectatorPosition()

proto native void CGame::UpdateSpectatorPosition ( vector position)
private

Updates spectator position on server = position of network bubble.

Parameters
position

◆ UpdateVoiceLevel()

void CGame::UpdateVoiceLevel ( int level)
inlineprotected

Definition at line 3305 of file DayZGame.c.

3306 {
3307 GetMission().UpdateVoiceLevelWidgets(level);
3308 }

References GetMission().

◆ VerifyWorldOwnership()

proto native bool CGame::VerifyWorldOwnership ( string sWorldName)
private

Member Data Documentation

◆ ARROW_PIERCE_DEPTH

const float CGame::ARROW_PIERCE_DEPTH = 0.05
protected

Definition at line 3158 of file DayZGame.c.

Referenced by OnProjectileStoppedInObject(), and OnProjectileStoppedInTerrain().

◆ Event_OnRPC

ref ScriptInvoker CGame::Event_OnRPC = new ScriptInvoker()
staticprivate

Definition at line 925 of file DayZGame.c.

◆ GameScript

ScriptModule CGame::GameScript
private

Definition at line 12 of file Game.c.

Referenced by CallQueueContext::CallParams().

◆ m_AimLoggingEnabled

bool CGame::m_AimLoggingEnabled
private

Definition at line 897 of file DayZGame.c.

Referenced by IsAimLogEnabled().

◆ m_AmmoShakeParams

ref AmmoCamParams CGame::m_AmmoShakeParams = new AmmoCamParams()
staticprivate

Definition at line 923 of file DayZGame.c.

◆ m_AnalyticsManagerClient

ref AnalyticsManagerClient CGame::m_AnalyticsManagerClient
private

Definition at line 18 of file Game.c.

Referenced by CGame(), and GetAnalyticsClient().

◆ m_AnalyticsManagerServer

ref AnalyticsManagerServer CGame::m_AnalyticsManagerServer
private

Definition at line 17 of file Game.c.

Referenced by CGame(), and GetAnalyticsServer().

◆ m_ArtySound

ref EffectSound CGame::m_ArtySound
private

Definition at line 936 of file DayZGame.c.

◆ m_Backlit

ref Backlit CGame::m_Backlit
private

Definition at line 927 of file DayZGame.c.

Referenced by GetBacklit().

◆ m_BillboardSetHandler

ref BillboardSetHandler CGame::m_BillboardSetHandler
protected

Definition at line 851 of file DayZGame.c.

Referenced by GetBillboardHandler().

◆ m_callQueue

ref ScriptCallQueue CGame::m_callQueue[CALL_CATEGORY_COUNT]
private

Definition at line 876 of file DayZGame.c.

◆ m_CharacterData

ref MenuDefaultCharacterData CGame::m_CharacterData
private

Definition at line 19 of file Game.c.

Referenced by GetMenuDefaultCharacterData().

◆ m_CharClassNames

ref array<string> CGame::m_CharClassNames = new array<string>()
private

Definition at line 929 of file DayZGame.c.

Referenced by ListAvailableCharacters().

◆ m_ConnectAddress

string CGame::m_ConnectAddress
protected

Definition at line 1970 of file DayZGame.c.

◆ m_ConnectedInputDeviceList

ref array<int> CGame::m_ConnectedInputDeviceList
private

Definition at line 930 of file DayZGame.c.

Referenced by GetConnectedInputDeviceList().

◆ m_ConnectFromJoin

bool CGame::m_ConnectFromJoin
private

Definition at line 902 of file DayZGame.c.

◆ m_connectionLost

ref ConnectionLost CGame::m_connectionLost
private

Definition at line 874 of file DayZGame.c.

◆ m_ConnectivityStatsStates

EConnectivityStatLevel CGame::m_ConnectivityStatsStates[STATS_COUNT]
private

Definition at line 858 of file DayZGame.c.

◆ m_ConnectPassword

string CGame::m_ConnectPassword
protected

Definition at line 1972 of file DayZGame.c.

◆ m_ConnectPort

int CGame::m_ConnectPort
protected

Definition at line 1971 of file DayZGame.c.

◆ m_CrashSound

ref EffectSound CGame::m_CrashSound
private

Definition at line 933 of file DayZGame.c.

◆ m_CursorDesiredVisibilityScript

bool CGame::m_CursorDesiredVisibilityScript = true
private

Definition at line 904 of file DayZGame.c.

Referenced by GetMouseCursorDesiredVisibility().

◆ m_DatabaseID

string CGame::m_DatabaseID
protected

Definition at line 1968 of file DayZGame.c.

Referenced by GetDatabaseID().

◆ m_DayZProfileOptions

ref DayZProfilesOptions CGame::m_DayZProfileOptions
private

Definition at line 880 of file DayZGame.c.

◆ m_DebugMonitorEnabled

int CGame::m_DebugMonitorEnabled
private

Definition at line 10 of file Game.c.

Referenced by IsDebugMonitor(), and SetDebugMonitorEnabled().

◆ m_DeltaTime

float CGame::m_DeltaTime
private

Definition at line 908 of file DayZGame.c.

Referenced by GetDeltaT().

◆ m_dragQueue

ref DragQueue CGame::m_dragQueue
private

Definition at line 879 of file DayZGame.c.

Referenced by GetDragQueue().

◆ m_early_access_dialog_accepted

bool CGame::m_early_access_dialog_accepted
private

Definition at line 881 of file DayZGame.c.

◆ m_EVValue

float CGame::m_EVValue = 0
private

Definition at line 917 of file DayZGame.c.

Referenced by GetCurrentEVValue(), and SetEVValue().

◆ m_FirstConnect

bool CGame::m_FirstConnect = true
protected

Definition at line 866 of file DayZGame.c.

◆ m_FoodDecayModifier

float CGame::m_FoodDecayModifier
private

Definition at line 893 of file DayZGame.c.

Referenced by GetFoodDecayModifier().

◆ m_GamepadDisconnectMenu

ref Widget CGame::m_GamepadDisconnectMenu
protected

Definition at line 1965 of file DayZGame.c.

◆ m_GameState

DayZGameState CGame::m_GameState
protected

Definition at line 863 of file DayZGame.c.

Referenced by GetGameState().

◆ m_IntroMenu

ref Widget CGame::m_IntroMenu
protected

Definition at line 1964 of file DayZGame.c.

Referenced by DeleteTitleScreen().

◆ m_IsConnecting

bool CGame::m_IsConnecting
private

Definition at line 901 of file DayZGame.c.

Referenced by IsConnecting().

◆ m_IsCtrlHolding

bool CGame::m_IsCtrlHolding
private

Definition at line 886 of file DayZGame.c.

Referenced by IsLeftCtrlDown().

◆ m_IsFoodDecayEnabled

bool CGame::m_IsFoodDecayEnabled = true
private

Definition at line 892 of file DayZGame.c.

◆ m_IsLeftAltHolding

bool CGame::m_IsLeftAltHolding
private

Definition at line 888 of file DayZGame.c.

◆ m_IsNewCharacter

bool CGame::m_IsNewCharacter
private

Definition at line 900 of file DayZGame.c.

Referenced by IsNewCharacter().

◆ m_IsRightAltHolding

bool CGame::m_IsRightAltHolding
private

Definition at line 889 of file DayZGame.c.

◆ m_IsStressTest

bool CGame::m_IsStressTest
private

Definition at line 896 of file DayZGame.c.

Referenced by IsStressTest().

◆ m_IsWinHolding

bool CGame::m_IsWinHolding
private

Definition at line 887 of file DayZGame.c.

◆ m_IsWorldWetTempUpdateEnabled

bool CGame::m_IsWorldWetTempUpdateEnabled = true
private

Definition at line 891 of file DayZGame.c.

Referenced by IsWorldWetTempUpdateEnabled().

◆ m_keyboard_handler

UIScriptedMenu CGame::m_keyboard_handler
private

Definition at line 882 of file DayZGame.c.

◆ m_loading

ref LoadingScreen CGame::m_loading
protected

Definition at line 869 of file DayZGame.c.

◆ m_LoadState

DayZLoadState CGame::m_LoadState
protected

Definition at line 864 of file DayZGame.c.

Referenced by GetLoadState().

◆ m_LoginQueue

ref LoginQueueBase CGame::m_LoginQueue
private

Definition at line 871 of file DayZGame.c.

Referenced by CancelLoginQueue().

◆ m_LoginTime

int CGame::m_LoginTime
private

Definition at line 872 of file DayZGame.c.

◆ m_LoginTimeScreen

ref LoginTimeBase CGame::m_LoginTimeScreen
private

Definition at line 870 of file DayZGame.c.

Referenced by CancelLoginTimeCountdown().

◆ m_mission_module

ScriptModule CGame::m_mission_module
private

Definition at line 883 of file DayZGame.c.

◆ m_MissionFolderPath

string CGame::m_MissionFolderPath
private

Definition at line 885 of file DayZGame.c.

Referenced by GetMissionFolderPath().

◆ m_MissionPath

string CGame::m_MissionPath
private

Definition at line 884 of file DayZGame.c.

Referenced by GetMissionPath().

◆ m_MissionState

int CGame::m_MissionState
private

Definition at line 860 of file DayZGame.c.

Referenced by GetMissionState().

◆ m_NoiseParams

ref NoiseParams CGame::m_NoiseParams = new NoiseParams()
staticprivate

Definition at line 939 of file DayZGame.c.

◆ m_Notifications

ref NotificationUI CGame::m_Notifications
protected

Definition at line 865 of file DayZGame.c.

◆ m_OriginalCharactersCount

int CGame::m_OriginalCharactersCount
private

Definition at line 898 of file DayZGame.c.

◆ m_ParamCache

ref array<ref Param> CGame::m_ParamCache
private

Definition at line 14 of file Game.c.

Referenced by CGame(), RPCSelfSingleParam(), and RPCSingleParam().

◆ m_PlayerName

string CGame::m_PlayerName
private

Definition at line 899 of file DayZGame.c.

Referenced by GetPlayerGameName().

◆ m_postUpdateQueue

ref ScriptInvoker CGame::m_postUpdateQueue[CALL_CATEGORY_COUNT]
private

Definition at line 878 of file DayZGame.c.

◆ m_PrevBlur

int CGame::m_PrevBlur
protected

Definition at line 1966 of file DayZGame.c.

◆ m_PreviousEVValue

float CGame::m_PreviousEVValue
private

Definition at line 916 of file DayZGame.c.

Referenced by GetPreviousEVValue().

◆ m_PreviousGamepad

int CGame::m_PreviousGamepad
private

Definition at line 905 of file DayZGame.c.

Referenced by GetPreviousGamepad().

◆ m_ReportModded

bool CGame::m_ReportModded
staticprivate

Definition at line 895 of file DayZGame.c.

Referenced by ReportModded().

◆ m_ShouldShowControllerDisconnect

bool CGame::m_ShouldShowControllerDisconnect
private

Definition at line 903 of file DayZGame.c.

Referenced by ShouldShowControllerDisconnect().

◆ m_timerQueue

ref TimerQueue CGame::m_timerQueue[CALL_CATEGORY_COUNT]
private

Definition at line 875 of file DayZGame.c.

◆ m_updateQueue

ref ScriptInvoker CGame::m_updateQueue[CALL_CATEGORY_COUNT]
private

Definition at line 877 of file DayZGame.c.

◆ m_UserFOV

float CGame::m_UserFOV
private

Definition at line 906 of file DayZGame.c.

Referenced by GetUserFOV().

◆ m_Visited

ref TStringArray CGame::m_Visited
protected

Definition at line 1975 of file DayZGame.c.

◆ m_volume_music

float CGame::m_volume_music
private

Definition at line 912 of file DayZGame.c.

◆ m_volume_radio

float CGame::m_volume_radio
private

Definition at line 914 of file DayZGame.c.

◆ m_volume_sound

float CGame::m_volume_sound
private

Definition at line 910 of file DayZGame.c.

◆ m_volume_speechEX

float CGame::m_volume_speechEX
private

Definition at line 911 of file DayZGame.c.

◆ m_volume_VOIP

float CGame::m_volume_VOIP
private

Definition at line 913 of file DayZGame.c.

◆ MAX_VISITED

const int CGame::MAX_VISITED = 50
protected

Definition at line 1974 of file DayZGame.c.

◆ MIN_ARTY_SOUND_RANGE

const int CGame::MIN_ARTY_SOUND_RANGE = 300
private

Definition at line 937 of file DayZGame.c.

◆ MISSION_STATE_FINNISH

const int CGame::MISSION_STATE_FINNISH = 2
protected

Definition at line 855 of file DayZGame.c.

◆ MISSION_STATE_GAME

const int CGame::MISSION_STATE_GAME = 1
protected

Definition at line 854 of file DayZGame.c.

Referenced by DayZGame().

◆ MISSION_STATE_MAINMENU

const int CGame::MISSION_STATE_MAINMENU = 0
protected

Definition at line 853 of file DayZGame.c.

◆ STATS_COUNT

const int CGame::STATS_COUNT = EConnectivityStatType.COUNT
private

Definition at line 857 of file DayZGame.c.

Referenced by ClearConnectivityStates().


The documentation for this class was generated from the following files: