39class TerrainCollisionInfo: CollisionInfoBase
69 override void Update(
float timeslice)
73 m_HintTimeAccu += timeslice;
81 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
89 g_Game.SetGameState(DayZGameState.MAIN_MENU);
90 g_Game.SetLoadState(DayZLoadState.MAIN_MENU_START);
114 g_Game.SetKeyboardHandle(
this);
119 g_Game.SetKeyboardHandle(NULL);
125 m_HintPanel =
new UiHintPanelLoading(layoutRoot.FindAnyWidget(
"hint_frame0"));
128 m_btnLeave = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btnLeave"));
130 layoutRoot.FindAnyWidget(
"notification_root").Show(
false);
132 #ifdef PLATFORM_CONSOLE
133 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
true);
137 #ifdef BUILD_EXPERIMENTAL
138 layoutRoot.FindAnyWidget(
"notification_root").Show(
true);
148 super.OnClick(w,
x,
y, button);
161 layoutRoot.Show(
true);
168 layoutRoot.Show(
false);
211 g_Game.SetKeyboardHandle(
this);
220 g_Game.SetKeyboardHandle(null);
228 m_txtDescription =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"txtDescription"));
229 m_txtLabel =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"txtLabel"));
230 m_btnLeave = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btnLeave"));
231 m_txtDescription.Show(
true);
232 layoutRoot.FindAnyWidget(
"notification_root").Show(
false);
234 #ifdef PLATFORM_CONSOLE
235 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
true);
239 #ifdef BUILD_EXPERIMENTAL
240 layoutRoot.FindAnyWidget(
"notification_root").Show(
true);
250 super.OnClick(w,
x,
y, button);
263 layoutRoot.Show(
true);
264 m_HintPanel =
new UiHintPanelLoading(layoutRoot.FindAnyWidget(
"hint_frame0"));
271 layoutRoot.Show(
false);
278 TimeConversions.ConvertSecondsToFullTime(time, m_FullTime);
280 text =
"#menu_loading_in_";
282 text =
"#dayz_game_spawning_in_";
284 if (m_FullTime.m_Days > 0)
286 else if (m_FullTime.m_Hours > 0)
288 else if (m_FullTime.m_Minutes > 0)
293 text =
Widget.TranslateString(text);
294 text =
string.
Format(text, m_FullTime.m_Seconds, m_FullTime.m_Minutes, m_FullTime.m_Hours, m_FullTime.m_Days);
295 m_txtLabel.SetText(text);
300 m_txtDescription.SetText(status);
344 m_WidgetRoot = game.GetWorkspace().CreateWidgets(
"gui/layouts/day_z_connection_lost.layout");
355 if (
g_Game.GetUIManager().IsDialogVisible())
357 g_Game.GetUIManager().HideDialog();
413 bool profileVal =
GetGame().GetProfileValueBool(profileOptionName, def);
432 int value = outValue.
ToInt();
446 float value = outValue.
ToFloat();
462 bool profileVal =
GetGame().GetProfileValueBool(r_opt.param1, r_opt.param3);
483 int value = outValue.
ToInt();
499 float value = outValue.
ToFloat();
665 MISSION_CONTROLLER_SELECT
694 m_WidgetRoot = game.GetLoadingWorkspace().CreateWidgets(
"gui/layouts/loading.layout");
713 m_WidgetRoot.FindAnyWidget(
"notification_root").Show(
false);
715 #ifdef PLATFORM_CONSOLE
717 #ifdef BUILD_EXPERIMENTAL
721 expNotification.Show(
true);
735 game.GetBacklit().LoadingAnim();
822 if (
m_DayZGame.GetUIManager().IsDialogVisible())
827 if (
m_DayZGame.GetMissionState() == DayZGame.MISSION_STATE_MAINMENU)
874 const int MISSION_STATE_MAINMENU = 0;
875 const int MISSION_STATE_GAME = 1;
876 const int MISSION_STATE_FINNISH = 2;
879 private EConnectivityStatLevel m_ConnectivityStatsStates[
STATS_COUNT];
887 protected bool m_FirstConnect =
true;
912 private bool m_IsWorldWetTempUpdateEnabled =
true;
913 private bool m_IsFoodDecayEnabled =
true;
937 #ifdef DIAG_DEVELOPER
955 private const int MIN_ARTY_SOUND_RANGE = 300;
959 static bool m_IsPreviewSpawn;
961 #ifdef DIAG_DEVELOPER
962 ref CameraToolsMenuServer m_CameraToolsMenuServer;
969#ifdef PLATFORM_CONSOLE
974 m_keyboard_handler = null;
977 m_early_access_dialog_accepted =
true;
989 m_dragQueue =
new DragQueue;
996 m_IsStressTest =
true;
1001 m_AimLoggingEnabled =
true;
1006 m_Backlit.OnInit(
this);
1011 if (m_loading == null)
1018 m_loading.ShowEx(
this);
1033 string path =
"cfgVehicles";
1034 string child_name =
"";
1037 for (
int p = 0; p < count; ++p)
1042 m_CharClassNames.Insert(child_name);
1045 m_IsConnecting =
false;
1046 m_ConnectFromJoin =
false;
1057 Print(
"~DayZGame()");
1085 m_IsWorldWetTempUpdateEnabled = (
GetCEApi().GetCEGlobalInt(
"WorldWetTempUpdate") == 1);
1087 m_FoodDecayModifier =
GetCEApi().GetCEGlobalFloat(
"FoodDecay");
1090 if (m_FoodDecayModifier ==
float.
MIN)
1092 m_FoodDecayModifier =
GetCEApi().GetCEGlobalInt(
"FoodDecay");
1121 m_DayZProfileOptions.ResetOptionsBool();
1122 m_DayZProfileOptions.ResetOptionsInt();
1123 m_DayZProfileOptions.ResetOptionsFloat();
1129 m_MissionPath =
path;
1134 while (pos_cur != -1)
1155 return m_callQueue[call_category];
1160 return m_updateQueue[call_category];
1165 return m_postUpdateQueue[call_category];
1194 m_MissionState = state;
1200 return m_DayZProfileOptions.GetProfileOption(option);
1210 return m_DayZProfileOptions.GetProfileOptionInt(option);
1215 return m_DayZProfileOptions.GetProfileOptionFloat(option);
1220 return m_DayZProfileOptions.GetProfileOptionDefaultBool(option);
1230 return m_DayZProfileOptions.GetProfileOptionDefaultInt(option);
1235 return m_DayZProfileOptions.GetProfileOptionDefaultFloat(option);
1240 m_DayZProfileOptions.SetProfileOptionBool(option, value);
1250 m_DayZProfileOptions.SetProfileOptionInt(option, value);
1255 m_DayZProfileOptions.SetProfileOptionFloat(option, value);
1260 return m_DayZProfileOptions.GetProfileOptionMap();
1275 m_GameState = state;
1285 m_LoadState = state;
1318 if (!m_early_access_dialog_accepted)
1321 m_early_access_dialog_accepted =
true;
1343 Print(
"Reloading mission module!");
1353 if (m_LoginQueue.IsStatic())
1355 m_LoginQueue.Hide();
1360 m_LoginQueue.Close();
1369 if (m_LoginTimeScreen)
1371 if (m_LoginTimeScreen.IsStatic())
1373 m_LoginTimeScreen.Hide();
1378 m_LoginTimeScreen.Close();
1386 m_ConnectivityStatsStates[i] = 0;
1397 switch (eventTypeId)
1412 m_FirstConnect =
true;
1421 m_FirstConnect =
true;
1422 #ifdef PLATFORM_CONSOLE
1433 m_Notifications.ClearVoiceNotifications();
1477 #ifdef PLATFORM_CONSOLE
1478 m_Notifications.ClearVoiceNotifications();
1483 m_FirstConnect =
false;
1489 #ifdef PLATFORM_CONSOLE
1490 #ifndef PLATFORM_WINDOWS
1509 int duration = conLost_params.param1;
1586 string msg1 = loginStatusParams.param1;
1587 string msg2 = loginStatusParams.param2;
1591 if (m_LoginTimeScreen)
1596 finalMsg +=
"\n" + msg2;
1598 m_LoginTimeScreen.SetStatus(finalMsg);
1603 finalMsg = msg1 +
" " + msg2;
1604 m_loading.SetStatus(finalMsg);
1610 g_Game.SetGameState(DayZGameState.CONNECTING);
1616 g_Game.SetGameState(DayZGameState.MAIN_MENU);
1618 if (m_ConnectFromJoin)
1620 m_ConnectFromJoin =
false;
1630 Print(
"### DLC Ownership failed !!! Map: " + dlcParams.param1);
1637 if (
Class.
CastTo(connectivityStatsParams, params))
1646 if (pingAvg <
GetWorld().GetPingWarningThreshold())
1650 else if (pingAvg <
GetWorld().GetPingCriticalThreshold())
1666 #ifdef DIAG_DEVELOPER
1667 m_ServerFpsStatsParams = serverFpsStatsParams;
1669 float fps = serverFpsStatsParams.param1;
1670 if (fps >
GetWorld().GetServerFpsWarningThreshold())
1674 else if (fps >
GetWorld().GetServerFpsCriticalThreshold())
1697 emh.
OnEvent(eventTypeId, params);
1702 if (level != m_ConnectivityStatsStates[type])
1706 m_ConnectivityStatsStates[type] = level;
1723 #ifdef DIAG_DEVELOPER
1724 private void DrawPerformaceStats(
float pingAct,
float pingAvg)
1729 if ( pingAvg >=
GetWorld().GetPingCriticalThreshold())
1731 else if ( pingAvg >=
GetWorld().GetPingWarningThreshold())
1737 DbgUI.
PlotLive(
"pingAvg history:", 300,150, pingAvg, 2000, 100 );
1738 DbgUI.
Text(
"Server Fps Warning Threshold:" +
GetWorld().GetServerFpsWarningThreshold());
1739 DbgUI.
Text(
"Server Fps Critical Threshold:" +
GetWorld().GetServerFpsCriticalThreshold());
1740 if (m_ServerFpsStatsParams)
1743 if ( m_ServerFpsStatsParams.param1 <= GetWorld().GetServerFpsCriticalThreshold())
1745 else if ( m_ServerFpsStatsParams.param1 <= GetWorld().GetServerFpsWarningThreshold())
1747 DbgUI.
ColoredText(color,
"serverFPS:" + m_ServerFpsStatsParams.param1.ToString() );
1748 DbgUI.
PlotLive(
"serverFPS history:", 300,150, m_ServerFpsStatsParams.param1, 6000, 100 );
1756 m_Notifications.AddVoiceNotification(vonStartParams.param2, vonStartParams.param1);
1761 m_Notifications.RemoveVoiceNotification(vonStopParams.param2);
1770 if (!m_LoginQueue && pos > 0)
1781 m_LoginQueue =
new LoginQueueStatic();
1790 LoginQueueStatic loginQueue;
1793 loginQueue.Update(timeslice);
1807 m_LoginTime = loginTime;
1810 if (m_LoginTime > 0)
1812 if (!m_LoginTimeScreen)
1823 m_LoginTimeScreen =
new LoginTimeStatic();
1828 m_LoginTimeScreen.
SetTime(m_LoginTime);
1829 m_LoginTimeScreen.Show();
1840 if (m_LoginTimeScreen)
1842 if (m_LoginTime > 0)
1844 m_LoginTimeScreen.SetTime(m_LoginTime);
1862 if (!m_LoginTimeScreen)
1870 m_LoginTimeScreen.SetRespawn(
true);
1871 m_LoginTimeScreen.SetTime(m_LoginTime);
1872 m_LoginTimeScreen.Show();
1878 PPERequesterBank.GetRequester(PPERequester_DeathDarkening).Start(
new Param1<float>(1.0));
1885 if (m_LoginTimeScreen && !m_LoginTimeScreen.IsRespawn())
1925 if (duration < 0 &&
GetGameState() == DayZGameState.IN_GAME)
1940 switch (progressState)
1949 m_loading.SetTitle(title);
1950 if (m_loading.m_HintPanel)
1951 m_loading.m_HintPanel.ShowRandomPage();
1964 m_loading.SetProgress(progress);
1971 m_loading.SetProgress(0);
2013 #ifndef PLATFORM_PS4
2056 protected const int MAX_VISITED = 50;
2078 m_IntroMenu.FindAnyWidget(
"notification_root").Show(
false);
2081 string text =
Widget.TranslateString(
"#console_start_game");
2082 #ifdef PLATFORM_XBOX
2085 text_widget.SetText(
string.Format(text,
"<image set=\"xbox_buttons\" name=\"A\" />"));
2087 text_widget.SetText(
string.Format(text,
"<image set=\"xbox_buttons\" name=\"A\" />"));
2091 string confirm =
"cross";
2100 text_widget.SetText(
string.Format(text,
"<image set=\"playstation_buttons\" name=\"" + confirm +
"\" />"));
2104 #ifdef PLATFORM_CONSOLE
2105 #ifdef PLATFORM_XBOX
2106 #ifdef BUILD_EXPERIMENTAL
2107 m_IntroMenu.FindAnyWidget(
"notification_root").Show(
true);
2128 #ifdef PLATFORM_CONSOLE
2132 if (m_ShouldShowControllerDisconnect)
2145 #ifdef PLATFORM_CONSOLE
2166 #ifndef PLATFORM_WINDOWS
2167 #ifdef PLATFORM_CONSOLE
2192#ifdef PLATFORM_WINDOWS
2224 #ifndef PLATFORM_WINDOWS
2225 #ifdef PLATFORM_CONSOLE
2286 case DayZLoadState.JOIN_START:
2291 case DayZLoadState.PARTY_START:
2296 case DayZLoadState.MAIN_MENU_START:
2301 case DayZLoadState.CONNECT_START:
2306 case DayZLoadState.MISSION_START:
2321 m_PreviousGamepad = gamepad;
2332 if (
GetInput().IsActiveGamepadSelected())
2341 #ifdef PLATFORM_CONSOLE
2342 #ifndef PLATFORM_WINDOWS
2384 #ifdef PLATFORM_CONSOLE
2398 case DayZLoadState.JOIN_USER_SELECT:
2404 case DayZLoadState.PARTY_USER_SELECT:
2411 case DayZLoadState.CONNECT_USER_SELECT:
2417 case DayZLoadState.MAIN_MENU_USER_SELECT:
2419 SetLoadState(DayZLoadState.MAIN_MENU_CONTROLLER_SELECT);
2424 case DayZLoadState.MISSION_USER_SELECT:
2438 if (
GetLoadState() == DayZLoadState.JOIN_CONTROLLER_SELECT)
2449 case DayZLoadState.CONNECT_CONTROLLER_SELECT:
2455 case DayZLoadState.PARTY_CONTROLLER_SELECT:
2461 case DayZLoadState.MAIN_MENU_CONTROLLER_SELECT:
2475 if (m_ConnectAddress == address && m_ConnectPort == port)
2494 if (m_Visited.Count() > 0)
2496 string uid = m_Visited.Get(m_Visited.Count() - 1);
2498 uid.
Split(
":", output);
2500 port = output[1].ToInt();
2509 string uid = ip +
":" + port;
2512 int pos = m_Visited.Find(uid);
2516 if (m_Visited.Count() == MAX_VISITED)
2517 m_Visited.Remove(0);
2518 m_Visited.Insert(uid);
2523 if (pos != (m_Visited.Count() - 1))
2525 m_Visited.Remove(pos);
2526 m_Visited.Insert(uid);
2536 string uid = ip +
":" + port;
2537 int index = m_Visited.Find(uid);
2538 return (index >= 0);
2547 m_ConnectAddress = addr;
2548 m_ConnectPort = port;
2562 if (m_ConnectAddress == addr && m_ConnectPort == port)
2566 if (
Connect(
GetUIManager().GetMenu(), m_ConnectAddress, m_ConnectPort, m_ConnectPassword) != 0)
2573 if (displayJoinError)
2614 if (
g_Game.GetGameState() != DayZGameState.MAIN_MENU)
2624 SetLoadState(DayZLoadState.MAIN_MENU_CONTROLLER_SELECT);
2642 m_ConnectAddress = ip;
2643 m_ConnectPort = port;
2644 m_ConnectPassword = password;
2645 m_ConnectFromJoin =
false;
2651 m_ConnectAddress = ip;
2652 m_ConnectPort = port;
2653 m_ConnectFromJoin =
true;
2663 m_ConnectPort = port.
ToInt();
2667 m_ConnectFromJoin =
false;
2681 if (key ==
KeyCode.KC_LCONTROL)
2683 m_IsCtrlHolding =
true;
2688 m_IsLeftAltHolding =
true;
2693 m_IsRightAltHolding =
true;
2696 if (m_keyboard_handler)
2698 m_keyboard_handler.
OnKeyDown(NULL, 0, 0, key);
2708 if ((m_IsLeftAltHolding || m_IsLeftAltHolding) && key ==
KeyCode.KC_F4)
2719 if (key ==
KeyCode.KC_LCONTROL)
2721 m_IsCtrlHolding =
false;
2726 m_IsWinHolding =
false;
2731 m_IsLeftAltHolding =
false;
2736 m_IsRightAltHolding =
false;
2739 if (m_keyboard_handler)
2741 m_keyboard_handler.
OnKeyUp(NULL, 0, 0, key);
2774 m_IsCtrlHolding =
false;
2775 m_IsWinHolding =
false;
2776 m_IsLeftAltHolding =
false;
2777 m_IsRightAltHolding =
false;
2790 m_DeltaTime = timeslice;
2793 bool gameIsRunning =
false;
2797 gameIsRunning =
true;
2814 if (m_loading && m_loading.IsLoading())
2816 m_loading.OnUpdate(timeslice);
2818 else if (m_LoginTimeScreen && m_LoginTimeScreen.IsStatic())
2820 m_LoginTimeScreen.Update(timeslice);
2831 if (m_Notifications)
2833 m_Notifications.Update(timeslice);
2837 #ifdef DIAG_DEVELOPER
2848 DrawPerformaceStats(pingAct, pingAvg);
2867 bool gameIsRunning =
false;
2871 gameIsRunning =
true;
2877 if (m_loading && m_loading.IsLoading())
2880 else if (m_LoginTimeScreen && m_LoginTimeScreen.IsStatic())
2898 super.OnRPC(sender, target, rpc_type, ctx);
2899 Event_OnRPC.Invoke(sender, target, rpc_type, ctx);
2906 target.OnRPC(sender, rpc_type, ctx);
2914 case ERPCs.RPC_CFG_GAMEPLAY_SYNC:
2919 case ERPCs.RPC_UNDERGROUND_SYNC:
2924 case ERPCs.RPC_SEND_NOTIFICATION:
2931 ctx.
Read(show_time);
2932 ctx.
Read(detail_text);
2937 case ERPCs.RPC_SEND_NOTIFICATION_EXTENDED:
2939 float show_time_ext;
2940 string title_text_ext;
2941 string detail_text_ext;
2944 ctx.
Read(show_time_ext);
2945 ctx.
Read(title_text_ext);
2946 ctx.
Read(detail_text_ext);
2954 case ERPCs.RPC_SOUND_HELICRASH:
2961 Param3<bool, vector, int> playCrashSound =
new Param3<bool, vector, int>(
false,
"0 0 0",0);
2962 if (ctx.
Read(playCrashSound))
2964 playSound = playCrashSound.param1;
2965 pos = playCrashSound.param2;
2978 case ERPCs.RPC_SOUND_ARTILLERY:
2981 Param1<vector> playArtySound =
new Param1<vector>(
vector.
Zero);
2982 if (ctx.
Read(playArtySound))
2984 position = playArtySound.param1;
3002 case ERPCs.RPC_SOUND_CONTAMINATION:
3006 Param1<vector> playContaminatedSound =
new Param1<vector>(
vector.
Zero);
3007 if (ctx.
Read(playContaminatedSound))
3009 soundPos = playContaminatedSound.param1;
3029 camera.SpawnCameraShake(strength_factor * 4);
3036 case ERPCs.RPC_SOUND_ARTILLERY_SINGLE:
3042 Param3<vector, vector, float> playArtyShotSound =
new Param3<vector, vector, float>(
vector.
Zero,
vector.
Zero, 0);
3043 if (ctx.
Read(playArtyShotSound))
3045 soundPosition = playArtyShotSound.param1;
3046 delayedSoundPos = playArtyShotSound.param2;
3047 soundDelay = playArtyShotSound.param3;
3070 case ERPCs.RPC_USER_SYNC_PERMISSIONS:
3073 if (ctx.
Read(mute_list))
3075 for (
int i = 0; i < mute_list.Count(); i++)
3077 string uid = mute_list.GetKey(i);
3078 bool mute = mute_list.GetElement(i);
3097 case ERPCs.DEV_RPC_ITEM_DIAG_BUTTON:
3111 case ERPCs.DEV_SET_WEATHER:
3113 Param1<DebugWeatherRPCData> p1data =
new Param1<DebugWeatherRPCData>(null);
3115 if ( ctx.
Read(p1data) )
3131 ErrorEx(
"Failed to read weather debug data");
3137 #ifdef DIAG_DEVELOPER
3139 case ERPCs.DIAG_CAMERATOOLS_CAM_DATA:
3141 if (!m_CameraToolsMenuServer)
3143 m_CameraToolsMenuServer =
new CameraToolsMenuServer;
3145 m_CameraToolsMenuServer.OnRPC(rpc_type, ctx);
3149 case ERPCs.DIAG_CAMERATOOLS_CAM_SUBSCRIBE:
3151 if (!m_CameraToolsMenuServer)
3153 m_CameraToolsMenuServer =
new CameraToolsMenuServer;
3155 m_CameraToolsMenuServer.OnRPC(rpc_type, ctx);
3178 if (
mission && !m_loading.IsLoading() && GetUIManager().IsDialogQueued())
3189 m_IsConnecting = value;
3200 return m_loading && m_loading.IsLoading();
3206 m_keyboard_handler = handler;
3213 m_loading.ShowEx(
this);
3221 m_loading.Hide(force);
3224 #ifdef PLATFORM_CONSOLE
3227 if (m_LoadState != DayZLoadState.MAIN_MENU_START && m_LoadState != DayZLoadState.MAIN_MENU_USER_SELECT)
3239 if (m_CharClassNames.Count() > 0)
3240 return m_CharClassNames[0];
3248 return m_CharClassNames.GetRandomElement();
3270 m_NoiseParams.LoadFromPath(
string.Format(
"cfgAmmo %1 NoiseExplosion", ammoType));
3278 float energyFactor,
float explosionFactor,
bool isWater,
string ammoType)
3283 source.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
3285 if (source.ShootsExplosiveAmmo() && ammoType ==
"Explosion_40mm_Ammo")
3289 m_AmmoShakeParams.Load(ammoType);
3291 if (distance_to_player < m_AmmoShakeParams.m_Radius)
3293 float dist01 =
Math.
InverseLerp(0, m_AmmoShakeParams.m_Radius, distance_to_player);
3294 float modifier =
Math.
Lerp(m_AmmoShakeParams.m_ModifierClose, m_AmmoShakeParams.m_ModifierFar,dist01);
3296 GetGame().
GetPlayer().GetCurrentCamera().SpawnCameraShake(modifier * m_AmmoShakeParams.m_Strength);
3309 if (simulation ==
"shotArrow")
3316 arrow.PlaceOnSurface();
3317 arrow.SetFromProjectile(info);
3321 const float ARROW_PIERCE_DEPTH = 0.05;
3328 if (info.GetIsWater())
3332 if (simulation ==
"shotArrow")
3336 vector pos = info.GetPos();
3337 vector dir = -info.GetInVelocity();
3343 arrow.SetDirection(dir);
3344 arrow.SetFromProjectile(info);
3354 if (simulation ==
"shotArrow")
3363 EntityAI parent = ent.GetHierarchyParent();
3364 if (parent && parent.IsPlayer())
3367 arrow.PlaceOnSurface();
3368 arrow.SetFromProjectile(info);
3374 vector pos = info.GetPos();
3375 vector dir = -info.GetInVelocity();
3381 arrow.SetDirection(dir);
3382 arrow.SetFromProjectile(info);
3390 vector exitPos,
vector inSpeed,
vector outSpeed,
bool isWater,
bool deflected,
string ammoType)
3393 ImpactEffectsData impactEffectsData =
new ImpactEffectsData();
3394 impactEffectsData.m_DirectHit = directHit;
3395 impactEffectsData.m_ComponentIndex = componentIndex;
3396 impactEffectsData.m_Surface = surface;
3397 impactEffectsData.m_Position = pos;
3398 impactEffectsData.m_ImpactType =
ImpactTypes.UNKNOWN;
3399 impactEffectsData.m_SurfaceNormal = surfNormal;
3400 impactEffectsData.m_ExitPosition = exitPos;
3401 impactEffectsData.m_InSpeed = inSpeed;
3402 impactEffectsData.m_OutSpeed = outSpeed;
3403 impactEffectsData.m_IsDeflected = deflected;
3404 impactEffectsData.m_AmmoType = ammoType;
3405 impactEffectsData.m_IsWater = isWater;
3409 if (directHit && player && directHit == player)
3411 player.OnPlayerRecievedHit();
3422 if (source && source.ShootsExplosiveAmmo() && !deflected && outSpeed ==
vector.
Zero)
3424 if (ammoType ==
"Bullet_40mm_ChemGas")
3428 else if (ammoType ==
"Bullet_40mm_Explosive")
3430 DamageSystem.ExplosionDamage(
EntityAI.Cast(source), null,
"Explosion_40mm_Ammo", pos,
DamageType.EXPLOSION);
3435 m_NoiseParams.LoadFromPath(
"cfgAmmo " + ammoType +
" NoiseHit");
3438 float coefAdjusted = surfaceCoef * inSpeed.
Length() /
ConfigGetFloat(
"cfgAmmo " + ammoType +
" initSpeed");
3445 bool isWater,
string ammoType)
3448 ImpactEffectsData impactEffectsData =
new ImpactEffectsData();
3449 impactEffectsData.m_DirectHit = directHit;
3450 impactEffectsData.m_ComponentIndex = componentIndex;
3451 impactEffectsData.m_Surface = surface;
3452 impactEffectsData.m_Position = pos;
3453 impactEffectsData.m_ImpactType =
ImpactTypes.MELEE;
3455 impactEffectsData.m_ExitPosition =
"0 0 0";
3456 impactEffectsData.m_InSpeed =
"0 0 0";
3457 impactEffectsData.m_OutSpeed =
"0 0 0";
3458 impactEffectsData.m_IsDeflected =
false;
3459 impactEffectsData.m_AmmoType = ammoType;
3460 impactEffectsData.m_IsWater = isWater;
3464 if (directHit && player && directHit == player)
3465 player.OnPlayerRecievedHit();
3473 m_NoiseParams.LoadFromPath(
"cfgAmmo " + ammoType +
" NoiseHit");
3487 m_OriginalCharactersCount = menudata_count;
3492 m_PlayerName =
name;
3502 m_IsNewCharacter = state;
3512 if (pFov < OPTIONS_FIELD_OF_VIEW_MIN)
3513 pFov = OPTIONS_FIELD_OF_VIEW_MIN;
3515 if (pFov > OPTIONS_FIELD_OF_VIEW_MAX)
3516 pFov = OPTIONS_FIELD_OF_VIEW_MAX;
3529 NumericOptionsAccess noa;
3532 return noa.ReadValue();
3569 string cfg_path =
"CfgWeapons " + weaponInHand.GetType() +
" chamberableFrom";
3572 foreach (
string ammo_name : ammo_names)
3574 if (ammo.GetType() == ammo_name)
3603 ListOptionsAccess language_option;
3607 if (language_option)
3609 idx = language_option.GetIndex();
3627 #ifdef DIAG_DEVELOPER
3629 if (FeatureTimeAccel.GetFeatureTimeAccelEnabled(ETimeAccelCategories.FOOD_DECAY))
3631 return m_FoodDecayModifier * FeatureTimeAccel.GetFeatureTimeAccelValue();
3639 if (!m_ConnectedInputDeviceList)
proto native CEApi GetCEApi()
Get the CE API.
const int ECE_DYNAMIC_PERSISTENCY
DamageType
exposed from C++ (do not change)
class AttachmentSoundLookupTable extends SoundLookupTable m_NoiseParams
class DayZProfilesOptions PARTY_CONTROLLER_SELECT
class DayZProfilesOptions MISSION_USER_SELECT
ImageWidget m_ImageLogoCorner
ImageWidget m_ImageLoadingIcon
ImageWidget m_ImageWidgetBackground
enum DisconnectSessionFlags DISCONNECT_SESSION_FLAGS_FORCE
class DayZProfilesOptions PARTY_USER_SELECT
class DayZProfilesOptions JOIN_START
class DayZProfilesOptions MAIN_MENU_USER_SELECT
Param3< string, int, int > DayZProfilesOptionInt
class DayZProfilesOptions CONNECT_START
void SetProgress(float val)
TextWidget m_TextWidgetTitle
float m_LastProgressUpdate
class DayZProfilesOptions MISSION_START
const int DISCONNECT_SESSION_FLAGS_ALL
class DayZProfilesOptions PARTY
class DayZProfilesOptions MAIN_MENU_CONTROLLER_SELECT
protected int m_iPosition
ref UiHintPanelLoading m_HintPanel
@ DISCONNECT_ERROR_ENABLED
class DayZProfilesOptions UNDEFINED
TextWidget m_ModdedWarning
void ShowEx(DayZGame game)
Param3< string, float, float > DayZProfilesOptionFloat
ProgressBarWidget m_ProgressLoading
class DayZProfilesOptions JOIN_USER_SELECT
const int DISCONNECT_SESSION_FLAGS_JOIN
override protected bool CanChangeHintPage(float timeAccu)
ImageWidget m_ImageLogoMid
DayZProfilesOption DayZProfilesOptionBool
class DayZProfilesOptions JOIN_CONTROLLER_SELECT
void SetTitle(string title)
class DayZProfilesOptions CONNECTING
class DayZProfilesOptions CONNECT_USER_SELECT
class DayZProfilesOptions MAIN_MENU_START
void LoadingScreen(DayZGame game)
TextWidget m_TextWidgetStatus
void SetStatus(string status)
class DayZProfilesOptions PARTY_START
override bool OnClick(Widget w, int x, int y, int button)
buttons clicks
float m_ImageLoadingIconRotation
ImageWidget m_ImageBackground
class LoginScreenBase extends UIScriptedMenu m_txtPosition
class DayZProfilesOptions m_WidgetRoot
class DayZProfilesOptions CONNECT
TextWidget m_ProgressText
class DayZProfilesOptions JOIN
class CrashSoundSets GetIsWater
Param3< string, bool, bool > DayZProfilesOption
void SetPosition(int position)
ProjectileStoppedInfo Managed GetSurfNormal()
protected ButtonWidget m_btnLeave
class DayZProfilesOptions MAIN_MENU
class DayZProfilesOptions CONNECT_CONTROLLER_SELECT
protected TextWidget m_txtNote
void SetDispatcher(Dispatcher dispatcher)
int GetID()
Get the ID registered in SEffectManager.
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
class NoiseSystem NoiseParams()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
protected DayZGame m_Game
class JsonUndergroundAreaTriggerData GetPosition
static void PlayerDisconnected(StatsEventDisconnectedData data)
static void PlayerSpawned(StatsEventSpawnedData data)
proto native bool IsOnline()
proto native owned string GetName()
proto native EBiosError ParsePartyAsync(string party_data)
Parse the party data from from command line parameters.
proto native EBiosError LogOnUserAsync(BiosUser user)
Display a system dependant ui for log-on.
proto native EBiosError ParseJoinAsync(string join_data)
Parse the join data from from command line parameters.
proto native BiosUser GetTitleInitiator()
Gets the initiatior of the title.
proto native BiosUser GetSelectedUser()
Returns the currently selected user.
void SelectUserEx(BiosUser user)
proto native EBiosError PickUserAsync()
Display a system dependant account picket.
proto native EBiosError GetUserDatabaseIdAsync()
Call async function to get database ID.
void LoadingHide(bool force=false)
protected void SetConnectivityStatState(EConnectivityStatType type, EConnectivityStatLevel level)
private UIScriptedMenu m_keyboard_handler
void LoadProgressUpdate(int progressState, float progress, string title)
void ExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
void RemoveVoiceNotification(VONStopSpeakingEventParams vonStopParams)
int GetCurrentDisplayLanguageIdx()
ref LoadingScreen m_loading
private string m_PlayerName
proto native void SetEVUser(float value)
Sets custom camera camera EV. range: -50.0..50.0? //TODO.
void UpdateInputDeviceDisconnectWarning()
bool GetProfileOption(EDayZProfilesOptions option)
override DragQueue GetDragQueue()
static bool ReportModded()
void DelayedMidAirDetonation(float x, float y, float z)
protected ref NotificationUI m_Notifications
static bool CheckAmmoCompability(EntityAI weaponInHand, EntityAI ammo)
void SetNewCharacter(bool state)
override void OnActivateMessage()
void OnProjectileStoppedInTerrain(TerrainCollisionInfo info)
proto native Mission GetMission()
string GetPlayerGameName()
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
override void OnKeyRelease(int key)
void OnGameplayDataHandlerLoad()
private int m_MissionState
void SetUserFOV(float pFov)
private ref EffectSound m_ArtySound
void CreateGamepadDisconnectMenu()
void SetPlayerGameName(string name)
bool GetProfileOptionBool(EDayZProfilesOptions option)
proto native bool GetModToBeReported()
void OnRespawnEvent(int time)
override void OnKeyPress(int key)
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
proto native void StartRandomCutscene(string world)
Starts intro.
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
proto native void DisconnectSessionForce()
Forces disconnect from current multiplayer session even if not yet in the game.
proto native float ConfigGetFloat(string path)
Get float value from config on path.
void ConnectFromServerBrowser(string ip, int port, string password="")
void AddVisitedServer(string ip, int port)
override string CreateRandomPlayer()
private ref array< int > m_ConnectedInputDeviceList
private bool m_AimLoggingEnabled
void ResetProfileOptions()
void DeleteGamepadDisconnectMenu()
private bool m_IsStressTest
void SetProfileOptionFloat(EDayZProfilesOptions option, float value)
proto native Input GetInput()
proto native void SetPlayerName(string name)
Sets current player name.
float GetFoodDecayModifier()
float GetProfileOptionDefaultFloat(EDayZProfilesOptions option)
bool GetProfileOptionDefault(EDayZProfilesOptions option)
private bool m_ShouldShowControllerDisconnect
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.
override bool OnInitialize()
void RefreshCurrentServerInfo()
proto native AbstractSoundScene GetSoundScene()
override TimerQueue GetTimerQueue(int call_category)
float GetPreviousEVValue()
void AddVoiceNotification(VONStopSpeakingEventParams vonStartParams)
static bool m_ReportModded
proto native DayZPlayer GetPlayer()
protected int m_ConnectPort
proto native void GetProfileStringList(string name, out TStringArray values)
Gets array of strings from profile variable.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
void SetLoadState(DayZLoadState state)
override void OnPostUpdate(bool doSim, float timeslice)
int GetProfileOptionDefaultInt(EDayZProfilesOptions option)
private bool m_IsLeftAltHolding
DayZGameState GetGameState()
void LoginTimeCountdown()
bool IsWorldWetTempUpdateEnabled()
int m_OriginalCharactersCount
proto native void RequestExit(int code)
Sets exit code and quits in the right moment.
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 SetMissionPath(string path)
Called from C++.
proto native void SetProfileString(string name, string value)
Sets string to profile variable.
protected ref TStringArray m_Visited
private bool m_IsCtrlHolding
float GetProfileOptionFloat(EDayZProfilesOptions option)
void StoreLoginDataPrepare()
override ScriptCallQueue GetCallQueue(int call_category)
private ref Backlit m_Backlit
bool GetProfileOptionDefaultBool(EDayZProfilesOptions option)
void OnPreloadEvent(vector pos)
private string m_MissionPath
protected string m_DatabaseID
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
private bool m_IsConnecting
override bool IsInventoryOpen()
void SetKeyboardHandle(UIScriptedMenu handler)
proto native void MutePlayer(string muteUID, string playerUID, bool mute)
Mutes voice of source player to target player.
const int MISSION_STATE_GAME
proto native int ConfigGetInt(string path)
Get int value from config on path.
override void OnEvent(EventType eventTypeId, Param params)
void OnProjectileStoppedInObject(ObjectCollisionInfo info)
protected ref Widget m_GamepadDisconnectMenu
override void OnMouseButtonRelease(int button)
protected bool OnConnectivityStatChange(EConnectivityStatType type, EConnectivityStatLevel newLevel, EConnectivityStatLevel oldLevel)
void DisconnectSessionScript(bool displayJoinError=false)
private bool m_early_access_dialog_accepted
const float ARROW_PIERCE_DEPTH
float GetCurrentEVValue()
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
DayZLoadState GetLoadState()
map< EDayZProfilesOptions, ref DayZProfilesOption > GetProfileOptionMap()
override void OnMouseButtonPress(int button)
proto native World GetWorld()
bool IsFoodDecayEnabled()
proto bool GetProfileString(string name, out string value)
Gets string from profile variable.
void EarlyAccessDialog(UIScriptedMenu parent)
void SetEVValue(float value)
array< int > GetConnectedInputDeviceList()
void SetProfileOptionBool(EDayZProfilesOptions option, bool value)
void SetProfileOptionInt(EDayZProfilesOptions option, int value)
private bool m_IsNewCharacter
proto native bool IsServer()
bool IsVisited(string ip, int port)
bool GetLastVisitedServer(out string ip, out int port)
private ref LoginQueueBase m_LoginQueue
override void OnAfterCreate()
private float m_FoodDecayModifier
override ScriptInvoker GetUpdateQueue(int call_category)
bool IsKindOf(string cfg_class_name, string cfg_parent_name)
Returns is class name inherited from parent class name.
int GetProfileOptionInt(EDayZProfilesOptions option)
override void OnDeviceReset()
private bool m_IsWinHolding
private bool m_ConnectFromJoin
override void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
protected ref Widget m_IntroMenu
void EnterLoginTime(UIMenuPanel parent)
void CloseCombatEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, bool isWater, string ammoType)
void SetPreviousGamepad(int gamepad)
void CancelLoginTimeCountdown()
proto protected native void CreateMission(string path)
Create only enforce script mission, used for mission script reloading.
void OnMPConnectionLostEvent(int duration)
private ref DayZProfilesOptions m_DayZProfileOptions
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
float GetHUDBrightnessSetting()
proto bool CommandlineGetParam(string name, out string value)
Get command line parameter value.
void ExplosionEffectsEx(Object source, Object directHit, int componentIndex, float energyFactor, float explosionFactor, HitInfo hitInfo)
void UpdateLoginQueue(float timeslice)
proto native bool IsMultiplayer()
proto native BiosUserManager GetUserManager()
private const int STATS_COUNT
proto native owned string GetMainMenuWorld()
protected DayZLoadState m_LoadState
override void OnDeactivateMessage()
protected string m_ConnectAddress
proto native UIManager GetUIManager()
proto native Weather GetWeather()
Returns weather controller object.
string GetMissionFolderPath()
void SelectUser(int gamepad=-1)
void OnProjectileStopped(ProjectileStoppedInfo info)
void SetHudBrightness(float value)
void OnLoginTimeEvent(int loginTime)
private string m_MissionFolderPath
void EnterLoginQueue(UIMenuPanel parent)
static float GetUserFOVFromConfig()
void SetGameState(DayZGameState state)
override string CreateDefaultPlayer()
override UIScriptedMenu CreateScriptedMenu(int id)
create custom main menu part (submenu)
proto native WorkspaceWidget GetWorkspace()
private ScriptModule m_mission_module
proto native void SaveProfile()
Saves profile on disk.
void SetMissionState(int state)
void SetConnecting(bool value)
Returns true when connecting to server.
proto native NoiseSystem GetNoiseSystem()
override TStringArray ListAvailableCharacters()
private int m_PreviousGamepad
proto native void SetProfileStringList(string name, TStringArray values)
Sets array of strings to profile variable.
void RegisterProfilesOptions()
private ref DragQueue m_dragQueue
override void OnUpdate(bool doSim, float timeslice)
void ConnectFromJoin(string ip, int port)
float GetFOVByZoomType(ECameraZoomType type)
proto native void AbortMission()
Returns to main menu, leave world empty for using last mission world.
void SetDatabaseID(string id)
private bool m_IsRightAltHolding
proto native void StoreLoginData(ParamsWriteContext ctx)
Stores login userdata as parameters which are sent to server
protected string m_ConnectPassword
private ref EffectSound m_CrashSound
void UpdateVoiceLevel(int level)
void InitCharacterMenuDataInfo(int menudata_count)
override ScriptInvoker GetPostUpdateQueue(int call_category)
private ref ConnectionLost m_connectionLost
proto native void PlayMission(string path)
Starts mission (equivalent for SQF playMission). You MUST use double slash \.
protected DayZGameState m_GameState
proto native void SetMainMenuWorld(string world)
private ref LoginTimeBase m_LoginTimeScreen
void DisconnectSessionEx(DisconnectSessionFlags flags)
private ref array< string > m_CharClassNames
private void ClearConnectivityStates()
bool ShouldShowControllerDisconnect()
private bool m_IsWorldWetTempUpdateEnabled
void SetProfileOption(EDayZProfilesOptions option, bool value)
static ref Param1< int > PARAM1_INT
static void OnRPC(Man player, ParamsReadContext ctx)
Super root of all classes in Enforce script.
static void ResetClientData()
private TextWidget m_TextWidgetTitle
void SetText(string text)
void ConnectionLost(DayZGame game)
void SetDuration(float duration)
private ref Widget m_WidgetRoot
static void RegisterSoundSet(string sound_set)
static string GetSoundSetByHash(int hash)
static ref map< int, string > m_Mappings
override void StopDeathDarkeningEffect()
bool GetProfileOption(EDayZProfilesOptions option)
private DayZGame m_Game void DayZProfilesOptions()
bool GetProfileOptionBool(EDayZProfilesOptions option)
void SetProfileOptionFloat(EDayZProfilesOptions option, float value)
float GetProfileOptionDefaultFloat(EDayZProfilesOptions option)
bool GetProfileOptionDefault(EDayZProfilesOptions option)
int GetProfileOptionDefaultInt(EDayZProfilesOptions option)
private ref map< EDayZProfilesOptions, ref DayZProfilesOptionFloat > m_DayZProfilesOptionsFloat
float GetProfileOptionFloat(EDayZProfilesOptions option)
bool GetProfileOptionDefaultBool(EDayZProfilesOptions option)
private ref map< EDayZProfilesOptions, ref DayZProfilesOptionInt > m_DayZProfilesOptionsInt
private ref map< EDayZProfilesOptions, ref DayZProfilesOptionBool > m_DayZProfilesOptionsBool
void SetProfileOptionBool(EDayZProfilesOptions option, bool value)
void SetProfileOptionInt(EDayZProfilesOptions option, int value)
void RegisterProfileOptionFloat(EDayZProfilesOptions option, string profileOptionName, float defaultValue=0.0)
int GetProfileOptionInt(EDayZProfilesOptions option)
void RegisterProfileOption(EDayZProfilesOptions option, string profileOptionName, bool def=true)
void RegisterProfileOptionBool(EDayZProfilesOptions option, string profileOptionName, bool defaultValue=true)
private ref map< EDayZProfilesOptions, ref DayZProfilesOption > m_DayZProfilesOptions
map< EDayZProfilesOptions, ref DayZProfilesOptionBool > GetProfileOptionMap()
void RegisterProfileOptionInt(EDayZProfilesOptions option, string profileOptionName, int defaultValue=0)
void SetProfileOption(EDayZProfilesOptions option, bool value)
float m_OvercastInterpolation
float m_RainInterpolation
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerMod...
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 proto native ErrorModuleHandler GetInstance()
Gets the EMH Instance.
void OnEvent(EventType eventTypeId, Param params)
is called by DayZGame to pass Events.
struct that keeps Time relevant information for future formatting
proto native OptionsAccess GetOptionByType(int accessType)
Get option by AccessType.
proto native void Initialize()
Initializes option values with the current users settings.
proto native bool IsWater()
proto native string GetSurface()
proto native vector GetPosition()
proto native vector GetSurfaceNormal()
proto native float GetSurfaceNoiseMultiplier()
proto native string GetAmmoType()
void SetConnectivityStatIcon(EConnectivityStatType type, EConnectivityStatLevel level)
static void EvaluateImpactEffectEx(ImpactEffectsData pData)
LoginQueue position when using -connect since mission is not created yet.
protected TextWidget m_txtDescription
protected bool m_IsRespawn
override protected bool CanChangeHintPage(float timeAccu)
void SetRespawn(bool value)
void SetStatus(string status)
private ref FullTimeData m_FullTime
protected TextWidget m_txtLabel
override bool OnClick(Widget w, int x, int y, int button)
protected ButtonWidget m_btnLeave
LoginTime when using -connect since mission is not created yet.
UIScriptedMenu CreateScriptedMenu(int id)
void OnMouseButtonPress(int button)
void UpdateVoiceLevelWidgets(int level)
void OnKeyRelease(int key)
void OnUpdate(float timeslice)
void OnEvent(EventType eventTypeId, Param params)
void OnMouseButtonRelease(int button)
proto void AddNoisePos(EntityAI source_entity, vector pos, NoiseParams noise_params, float external_strenght_multiplier=1.0)
proto void AddNoiseTarget(vector pos, float lifetime, NoiseParams noise_params, float external_strength_multiplier=1.0)
Will make a noise at that position which the AI will "see" for the duration of 'lifetime'.
static void InitInstance()
static void CleanupInstance()
static void Update(float timeslice)
static void AddNotificationExtended(float show_time, string title_text, string detail_text="", string icon="")
Send custom notification from to local player.
static void AddNotification(NotificationType type, float show_time, string detail_text="")
Send notification from default types to local player.
proto native vector GetHitObjPos()
proto native Object GetHitObj()
proto native int GetComponentIndex()
proto native vector GetHitObjRot()
static void OnGameplayDataHandlerLoad()
static BiosUser GetBiosUser()
static void SetMultiplayState(bool state)
static void LeaveGameplaySession()
static void LoadVoicePrivilege()
static void EnterGameplaySession()
static void GetCurrentServerInfo(string ip, int port)
static void LoadMPPrivilege()
static void SetBiosUser(BiosUser user)
static void ClearCurrentServerInfo()
Static component of PPE manager, used to hold the instance.
static PPEManager GetPPEManager()
Returns the manager instance singleton.
static void CreateManagerStatic()
static void DestroyManagerStatic()
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
static const int CONTAMINATED_AREA_GAS_SHELL
static void PreloadParticles()
Preloads all particles.
static const int EXPLOSION_LANDMINE
proto int GetPingAvg()
ping range estimation
proto owned string GetPlainId()
plaintext unique id of player (cannot be used in database or logs)
proto int GetPingAct()
ping range estimation
The class that will be instanced (moddable)
static proto native void DestroyAllPendingProgresses()
static proto native void SetUserData(Widget inst)
static proto native void SetProgressData(Widget inst)
proto native float GetProjectileDamage()
proto native vector GetPos()
proto native vector GetInVelocity()
proto native string GetAmmoType()
proto native Object GetSource()
Manager class for managing Effect (EffectParticle, EffectSound)
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.
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native void Tick(float timeslice)
executes calls on queue if their time is already elapsed, if 'repeat = false' call is removed from qu...
proto void Remove(func fn)
remove specific call from queue
ScriptInvoker Class provide list of callbacks usage:
proto void Invoke(void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
invoke call on all inserted methods with given arguments
Module containing compiled scripts.
proto native ParamsWriteContext GetWriteContext()
Serialization general interface. Serializer API works with:
proto bool Read(void value_in)
string m_CharacterId
character ID
string m_Reason
reason of disconnect (quit, kick, ban, sign-out...)
int m_DaytimeHour
current time in hour (hour in 24h)
int m_Population
population of current gameplay (server)
vector m_Position
position of spawn
string m_CharacterId
character ID
int m_Lifetime
lifetime of character in seconds
proto native bool ShowQueuedDialog()
bool CloseAllSubmenus()
Close all opened menus except first menu.
proto native void CloseDialog()
proto native int GetLoginQueuePosition()
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
proto native UIScriptedMenu EnterScriptedMenu(int id, UIMenuPanel parent)
Create & open menu with specific id (see MenuID) and set its parent.
bool CloseAll()
Close all opened menus.
proto native UIScriptedMenu ShowScriptedMenu(UIScriptedMenu menu, UIMenuPanel parent)
proto native void ScreenFadeOut(float duration)
static void OnRPC(ParamsReadContext ctx)
void OnEvent(EventType eventTypeId, Param params)
Manager class which handles Voice-over-network functionality while player is connected to a server.
static VONManagerBase GetInstance()
Main way to access VONManager functionality from script.
proto native Overcast GetOvercast()
Returns an overcast phenomenon object.
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native Fog GetFog()
Returns a fog phenomenon object.
proto native void Set(float forecast, float time=0, float minDuration=0)
Sets the forecast.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto float Normalize()
Normalizes vector. Returns length.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
proto native float Length()
Returns length of vector (magnitude)
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
const int PROGRESS_UPDATE
Param1< int > RespawnEventParams
RespawnTime.
Param1< int > MPConnectionLostEventParams
Duration.
Param1< int > LoginTimeEventParams
LoginTime.
const EventType MPSessionEndEventTypeID
no params
const EventType ConnectingStartEventTypeID
no params
PlayerIdentity PROGRESS_START
const EventType LoginStatusEventTypeID
params: LoginStatusEventParams
Param1< vector > PreloadEventParams
Position.
const EventType WorldCleaupEventTypeID
no params
Param1< string > DLCOwnerShipFailedParams
world name
Param1< int > LogoutEventParams
logoutTime
const EventType SelectedUserChangedEventTypeID
no params
const EventType RespawnEventTypeID
params: RespawnEventParams
const EventType MPSessionFailEventTypeID
no params
const int PROGRESS_PROGRESS
const EventType StartupEventTypeID
no params
const EventType DialogQueuedEventTypeID
no params
Param4< int, string, string, string > ChatMessageEventParams
channel, from, text, color config class
const EventType MPSessionStartEventTypeID
no params
const EventType PreloadEventTypeID
params: PreloadEventParams
const EventType LoginTimeEventTypeID
params: LoginTimeEventParams
Param1< PlayerIdentity > ConnectivityStatsUpdatedEventParams
PlayerIdentity.
const EventType ServerFpsStatsUpdatedEventTypeID
params: ServerFpsStatsUpdatedEventParams
const EventType ConnectivityStatsUpdatedEventTypeID
params: ConnectivityStatsUpdatedEventParams
const EventType MPConnectionLostEventTypeID
params: MPConnectionLostEventParams
Param1< float > ServerFpsStatsUpdatedEventParams
float
const EventType LogoutEventTypeID
params: LogoutEventParams
const EventType MPSessionPlayerReadyEventTypeID
no params
const EventType DLCOwnerShipFailedEventTypeID
params: DLCOwnerShipFailedParams
Param3< int, float, string > ProgressEventParams
state, progress, title
const int PROGRESS_FINISH
proto native CGame GetGame()
const EventType ProgressEventTypeID
params: ProgressEventParams
OptionAccessType
C++ OptionAccessType.
const EventType ChatMessageEventTypeID
params: ChatMessageEventParams
const EventType ConnectingAbortEventTypeID
no params
const string GAME_CHAT_MSG
const string SYSTEM_CHAT_MSG
const string RADIO_CHAT_MSG
const string PLAYER_CHAT_MSG
const string DIRECT_CHAT_MSG
const string ADMIN_CHAT_MSG
proto void Print(void var)
Prints content of variable to console/log.
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
static proto native void End()
static proto native void ColoredText(int color, string label)
static proto native void PlotLive(string label, int sizeX, int sizeY, float val, int timeStep=100, int historySize=30, int color=0xFFFFFFFF)
const float DZPLAYER_CAMERA_FOV_EYEZOOM_SHALLOW
const float DZPLAYER_CAMERA_FOV_EYEZOOM
FOV (vertical angle/2) in radians. Take care to modify also in "basicDefines.hpp".
const float LOADING_SCREEN_HINT_INTERVAL
const int CAMERA_SHAKE_ARTILLERY_DISTANCE2
const int CAMERA_SHAKE_ARTILLERY_DISTANCE
const float LOADING_SCREEN_HINT_INTERVAL_MIN
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
const string SHOW_QUICKBAR
const string SHOW_SERVERINFO
const string SHOW_CONNECTIVITYINFO
const string HUD_BRIGHTNESS
const string ENABLE_BLEEDINGINDICATION
const string SHOW_CROSSHAIR
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto int Randomize(int seed)
Sets the seed for the random number generator.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static proto float Min(float x, float y)
Returns smaller of two given values.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Sqrt(float val)
Returns square root.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
proto native int ToInt()
Converts string to integer.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
proto native float ToFloat()
Converts string to float.
proto native int IndexOfFrom(int start, string sample)
Finds 'sample' in 'str' from 'start' position. Returns -1 when not found.
proto native int Hash()
Returns hash of string.
proto native int Length()
Returns length of string.
proto bool GetCLIParam(string param, out string val)
Returns command line argument.