DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
DayZGame.c
См. документацию.
12
13const int DISCONNECT_SESSION_FLAGS_FORCE = int.MAX & ~DisconnectSessionFlags.IGNORE_WHEN_IN_GAME;
14const int DISCONNECT_SESSION_FLAGS_JOIN = int.MAX & ~DisconnectSessionFlags.JOIN_ERROR_CHECK;
15const int DISCONNECT_SESSION_FLAGS_ALL = int.MAX;
16
18{
19 proto native Object GetSource();
20 proto native vector GetPos();
21 proto native vector GetInVelocity();
22 proto native string GetAmmoType();
23 proto native float GetProjectileDamage();
24}
25
26class CollisionInfoBase: ProjectileStoppedInfo
27{
28 proto native vector GetSurfNormal();
29}
30
31class ObjectCollisionInfo: CollisionInfoBase
32{
33 proto native Object GetHitObj();
34 proto native vector GetHitObjPos();
35 proto native vector GetHitObjRot();
36 proto native int GetComponentIndex();
37}
38
39class TerrainCollisionInfo: CollisionInfoBase
40{
41 proto native bool GetIsWater();
42}
43
45{
47
48 static void RegisterSoundSet(string sound_set)
49 {
50 m_Mappings.Set(sound_set.Hash(), sound_set);
51 }
52
53 static string GetSoundSetByHash(int hash)
54 {
55 string sound_set;
56 if (m_Mappings)
57 m_Mappings.Find(hash,sound_set);
58 return sound_set;
59 }
60};
61
62
64{
65 protected ref UiHintPanelLoading m_HintPanel;
66 protected bool m_IsStatic;
67 protected float m_HintTimeAccu;
68
69 override void Update(float timeslice)
70 {
71 if (m_HintPanel)
72 {
73 m_HintTimeAccu += timeslice;
75 {
76 m_HintPanel.ShowRandomPage();
78 }
79 }
80
81 if (GetUApi().GetInputByID(UAUIBack).LocalPress())
82 {
83 Leave();
84 }
85 }
86
87 protected void Leave()
88 {
89 g_Game.SetGameState(DayZGameState.MAIN_MENU);
90 g_Game.SetLoadState(DayZLoadState.MAIN_MENU_START);
91
92 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).Call(g_Game.DisconnectSessionForce);
93
94 Close();
95 }
96
97 protected bool CanChangeHintPage(float timeAccu);
98
99 bool IsStatic()
100 {
101 return m_IsStatic;
102 }
103
105 {
106 return false;
107 }
108}
109
111{
114 protected ButtonWidget m_btnLeave;
115 protected int m_iPosition = -1;
116
118 {
119 g_Game.SetKeyboardHandle(this);
120 }
121
123 {
124 g_Game.SetKeyboardHandle(NULL);
125 }
126
127 override Widget Init()
128 {
129 layoutRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/dialog_queue_position.layout");
130 m_HintPanel = new UiHintPanelLoading(layoutRoot.FindAnyWidget("hint_frame0"));
131 m_txtPosition = TextWidget.Cast(layoutRoot.FindAnyWidget("txtPosition"));
132 m_txtNote = TextWidget.Cast(layoutRoot.FindAnyWidget("txtNote"));
133 m_btnLeave = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btnLeave"));
134 m_txtNote.Show(true);
135 layoutRoot.FindAnyWidget("notification_root").Show(false);
136
137 #ifdef PLATFORM_CONSOLE
138 bool showToolbar = !g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer() || g_Game.GetInput().GetCurrentInputDevice() == EInputDeviceType.CONTROLLER;
139 layoutRoot.FindAnyWidget("toolbar_bg").Show(showToolbar);
140 RichTextWidget toolbar_b = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon"));
141 toolbar_b.SetText(InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", "", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
142 Widget expNotification = layoutRoot.FindAnyWidget("notification_root");
143 bool isXBoxExperimental = false;
144 #ifdef PLATFORM_XBOX
145 #ifdef BUILD_EXPERIMENTAL
146 isXBoxExperimental = true;
147 #endif
148 #endif
149 #ifdef PLATFORM_MSSTORE
150 #ifdef BUILD_EXPERIMENTAL
151 isXBoxExperimental = true;
152 #endif
153 #endif
154 expNotification.Show(isXBoxExperimental);
155 #endif
156
157 return layoutRoot;
158 }
159
160 override bool OnClick(Widget w, int x, int y, int button)
161 {
162 super.OnClick(w, x, y, button);
163 if (w == m_btnLeave)
164 {
165 Leave();
166 return true;
167 }
168 return false;
169 }
170
171 void Show()
172 {
173 if (layoutRoot)
174 {
175 layoutRoot.Show(true);
176 }
177 }
178
179 void Hide()
180 {
181 if (layoutRoot)
182 layoutRoot.Show(false);
183 m_HintPanel = null;
184 }
185
187 {
188 if (position != m_iPosition)
189 {
191 m_txtPosition.SetText(position.ToString());
192 }
193 }
194
195 override protected bool CanChangeHintPage(float timeAccu)
196 {
198 }
199};
200
201
204{
206 {
207 Init();
208
209 m_IsStatic = true;
210 }
211};
212
214{
217 protected ButtonWidget m_btnLeave;
218
219 protected bool m_IsRespawn;
220
222
224 {
225 g_Game.SetKeyboardHandle(this);
226 m_IsRespawn = false;
227
228 m_FullTime = new FullTimeData();
229 }
230
232 {
233 if (g_Game)
234 g_Game.SetKeyboardHandle(null);
235 m_FullTime = null;
236 }
237
238 override Widget Init()
239 {
240 layoutRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/dialog_login_time.layout");
241
242 m_txtDescription = TextWidget.Cast(layoutRoot.FindAnyWidget("txtDescription"));
243 m_txtLabel = TextWidget.Cast(layoutRoot.FindAnyWidget("txtLabel"));
244 m_btnLeave = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btnLeave"));
245 m_txtDescription.Show(true);
246 layoutRoot.FindAnyWidget("notification_root").Show(false);
247
248 #ifdef PLATFORM_CONSOLE
249 bool showToolbar = !g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer() || g_Game.GetInput().GetCurrentInputDevice() == EInputDeviceType.CONTROLLER;
250 layoutRoot.FindAnyWidget("toolbar_bg").Show(showToolbar);
251 RichTextWidget toolbar_b = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon"));
252 toolbar_b.SetText(InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", "", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
253 Widget expNotification = layoutRoot.FindAnyWidget("notification_root");
254 bool isXBoxExperimental = false;
255 #ifdef PLATFORM_XBOX
256 #ifdef BUILD_EXPERIMENTAL
257 isXBoxExperimental = true;
258 #endif
259 #endif
260 #ifdef PLATFORM_MSSTORE
261 #ifdef BUILD_EXPERIMENTAL
262 isXBoxExperimental = true;
263 #endif
264 #endif
265 expNotification.Show(isXBoxExperimental);
266 #endif
267
268 return layoutRoot;
269 }
270
271 override bool OnClick(Widget w, int x, int y, int button)
272 {
273 super.OnClick(w, x, y, button);
274 if (w == m_btnLeave)
275 {
276 Leave();
277 return true;
278 }
279 return false;
280 }
281
282 void Show()
283 {
284 if (layoutRoot)
285 {
286 layoutRoot.Show(true);
287 m_HintPanel = new UiHintPanelLoading(layoutRoot.FindAnyWidget("hint_frame0"));
288 }
289 }
290
291 void Hide()
292 {
293 if (layoutRoot)
294 layoutRoot.Show(false);
295 m_HintPanel = null;
296 }
297
298 void SetTime(int time)
299 {
300 string text = "";
301 TimeConversions.ConvertSecondsToFullTime(time, m_FullTime);
302 if (!m_IsRespawn)
303 text = "#menu_loading_in_";
304 else
305 text = "#dayz_game_spawning_in_";
306
307 if (m_FullTime.m_Days > 0)
308 text += "dhms";
309 else if (m_FullTime.m_Hours > 0)
310 text += "hms";
311 else if (m_FullTime.m_Minutes > 0)
312 text += "ms";
313 else
314 text += "s";
315
316 text = Widget.TranslateString(text);
317 text = string.Format(text, m_FullTime.m_Seconds, m_FullTime.m_Minutes, m_FullTime.m_Hours, m_FullTime.m_Days);
318 m_txtLabel.SetText(text);
319
320 if (m_IsRespawn && time <= 1)
321 g_Game.SetLoginTimerFinished();
322 }
323
324 void SetStatus(string status)
325 {
326 m_txtDescription.SetText(status);
327 }
328
329 void SetRespawn(bool value)
330 {
331 m_IsRespawn = value;
332 }
333
335 {
336 return m_IsRespawn;
337 }
338
339 override protected bool CanChangeHintPage(float timeAccu)
340 {
342 }
343};
344
347{
349 {
350 Init();
351
352 m_IsStatic = true;
353 }
354
356 {
357 }
358};
359
360
361
363{
364 private ref Widget m_WidgetRoot;
366 private float m_duration;
367
368 void ConnectionLost(DayZGame game)
369 {
370 m_WidgetRoot = game.GetWorkspace().CreateWidgets("gui/layouts/day_z_connection_lost.layout");
371 m_WidgetRoot.Show(false);
372
373 Class.CastTo(m_TextWidgetTitle, m_WidgetRoot.FindAnyWidget("TextWidget"));
374 m_duration = 0.0;
375 }
376
377 void Show()
378 {
379 if (!m_WidgetRoot.IsVisible())
380 {
381 if (g_Game.GetUIManager().IsDialogVisible())
382 {
383 g_Game.GetUIManager().HideDialog();
384 }
385
386 m_WidgetRoot.Show(true);
387 m_TextWidgetTitle.SetText("");
388 }
389 }
390
391 void Hide()
392 {
393 if (m_WidgetRoot.IsVisible())
394 {
395 m_WidgetRoot.Show(false);
396 }
397 }
398
399 void SetText(string text)
400 {
401 m_TextWidgetTitle.SetText(text);
402 }
403
405 {
406 return m_duration;
407 }
408
409 void SetDuration(float duration)
410 {
411 m_duration = duration;
412 }
413};
414
415typedef Param3<string, bool, bool> DayZProfilesOption;
417typedef Param3<string, int, int> DayZProfilesOptionInt;
418typedef Param3<string, float, float> DayZProfilesOptionFloat;
419
421{
425
429
436
437 void RegisterProfileOption(EDayZProfilesOptions option, string profileOptionName, bool def = true)
438 {
439 if (!m_DayZProfilesOptionsBool.Contains(option))
440 {
442 bool profileVal = GetProfileValueBool(profileOptionName, def);
443
444 m_DayZProfilesOptionsBool.Set(option, new DayZProfilesOptionBool(profileOptionName, profileVal, def));
445 SetProfileOptionBool(option, profileVal);
446 }
447 }
448
449 void RegisterProfileOptionBool(EDayZProfilesOptions option, string profileOptionName, bool defaultValue = true)
450 {
451 RegisterProfileOption(option, profileOptionName, defaultValue);
452 }
453
454 void RegisterProfileOptionInt(EDayZProfilesOptions option, string profileOptionName, int defaultValue = 0)
455 {
456 if (!m_DayZProfilesOptionsInt.Contains(option))
457 {
459 string outValue;
460 g_Game.GetProfileString(profileOptionName, outValue);
461 int value = outValue.ToInt();
462
463 m_DayZProfilesOptionsInt.Set(option, new DayZProfilesOptionInt(profileOptionName, value, defaultValue));
464 SetProfileOptionInt(option, value);
465 }
466 }
467
468 void RegisterProfileOptionFloat(EDayZProfilesOptions option, string profileOptionName, float defaultValue = 0.0)
469 {
470 if (!m_DayZProfilesOptionsFloat.Contains(option))
471 {
473 string outValue;
474 g_Game.GetProfileString(profileOptionName, outValue);
475 float value = outValue.ToFloat();
476
477 m_DayZProfilesOptionsFloat.Set(option, new DayZProfilesOptionFloat(profileOptionName, value, defaultValue));
478 SetProfileOptionFloat(option, value);
479 }
480 }
481
483 {
485 {
487 }
488
490 {
491 bool profileVal = GetProfileValueBool(r_opt.param1, r_opt.param3);
492 SetProfileOptionBool(e_opt, profileVal);
493 }
494 }
495
497 {
499 }
500
502 {
504 {
506 }
507
509 {
510 string outValue;
511 g_Game.GetProfileString(r_opt.param1, outValue);
512 int value = outValue.ToInt();
513 SetProfileOptionInt(e_opt, value);
514 }
515 }
516
518 {
520 {
522 }
523
525 {
526 string outValue;
527 g_Game.GetProfileString(r_opt.param1, outValue);
528 float value = outValue.ToFloat();
529 SetProfileOptionFloat(e_opt, value);
530 }
531 }
532
533 void SetProfileOption(EDayZProfilesOptions option, bool value)
534 {
536 {
538
539 po.param2 = value;
540 g_Game.SetProfileString(po.param1, value.ToString());
541 g_Game.SaveProfile();
542
543 m_OnBoolOptionChanged.Invoke(po.param1, value);
544 }
545 }
546
548 {
549 SetProfileOption(option, value);
550 }
551
553 {
555 {
557
558 po.param2 = value;
559 g_Game.SetProfileString(po.param1, value.ToString());
560 g_Game.SaveProfile();
561
562 m_OnIntOptionChanged.Invoke(option, value);
563 }
564 }
565
567 {
569 {
571
572 po.param2 = value;
573 g_Game.SetProfileString(po.param1, value.ToString());
574 g_Game.SaveProfile();
575
576 m_OnFloatOptionChanged.Invoke(po.param1, value);
577 }
578 }
579
581 {
583 {
585 return po.param2;
586 }
587
588 return true;
589 }
590
592 {
593 return GetProfileOption(option);
594 }
595
597 {
599 {
601 return po.param2;
602 }
603
604 return 0;
605 }
606
608 {
610 {
612 return po.param2;
613 }
614
615 return 0.0;
616 }
617
622
624 {
626 {
628 return po.param3;
629 }
630
631 ErrorEx("Invalid profile option id! Returning 'true'.", ErrorExSeverity.WARNING);
632 return true;
633 }
634
636 {
638 {
640 return po.param3;
641 }
642
643 ErrorEx("Invalid profile option id! Returning '0'.", ErrorExSeverity.WARNING);
644 return 0;
645 }
646
648 {
650 {
652 return po.param3;
653 }
654
655 ErrorEx("Invalid profile option id! Returning '0.0'.", ErrorExSeverity.WARNING);
656 return 0.0;
657 }
658
666
670 private DayZGame m_Game;
671}
672
673enum DayZGameState
674{
681 IN_GAME
682}
683
684enum DayZLoadState
685{
686 UNDEFINED,
701 MISSION_CONTROLLER_SELECT
702}
703
704class LoadingScreen
705{
711 DayZGame m_DayZGame;
713
714 ImageWidget m_ImageLogoMid;
715 ImageWidget m_ImageLogoCorner;
717 ImageWidget m_ImageBackground;
718 ProgressBarWidget m_ProgressLoading;
721
724 ref UiHintPanelLoading m_HintPanel;
725 void LoadingScreen(DayZGame game)
726 {
727 m_DayZGame = game;
728
729 m_WidgetRoot = game.GetLoadingWorkspace().CreateWidgets("gui/layouts/loading.layout");
730 Class.CastTo(m_ImageLogoMid, m_WidgetRoot.FindAnyWidget("ImageLogoMid"));
731 Class.CastTo(m_ImageLogoCorner, m_WidgetRoot.FindAnyWidget("ImageLogoCorner"));
732
733 Class.CastTo(m_TextWidgetTitle, m_WidgetRoot.FindAnyWidget("TextWidget"));
734 Class.CastTo(m_TextWidgetStatus, m_WidgetRoot.FindAnyWidget("StatusText"));
735 Class.CastTo(m_ImageWidgetBackground, m_WidgetRoot.FindAnyWidget("ImageBackground"));
736 Class.CastTo(m_ImageLoadingIcon, m_WidgetRoot.FindAnyWidget("ImageLoadingIcon"));
737 Class.CastTo(m_ModdedWarning, m_WidgetRoot.FindAnyWidget("ModdedWarning"));
738
739 m_ImageBackground = ImageWidget.Cast(m_WidgetRoot.FindAnyWidget("ImageBackground"));
740 m_ProgressLoading = ProgressBarWidget.Cast(m_WidgetRoot.FindAnyWidget("LoadingBar"));
741
742 string tmp;
743 m_ProgressText = TextWidget.Cast(m_WidgetRoot.FindAnyWidget("ProgressText"));
744 if (g_Game)
745 {
746 m_ProgressText.Show(g_Game.CommandlineGetParam("loadingTest", tmp));
747 }
748
749 Widget expNotification = m_WidgetRoot.FindAnyWidget("notification_root");
750 bool isXBoxExperimental = false;
751 #ifdef PLATFORM_XBOX
752 #ifdef BUILD_EXPERIMENTAL
753 isXBoxExperimental = true;
754 #endif
755 #endif
756 #ifdef PLATFORM_MSSTORE
757 #ifdef BUILD_EXPERIMENTAL
758 isXBoxExperimental = true;
759 #endif
760 #endif
761 expNotification.Show(isXBoxExperimental);
762
763 m_ModdedWarning.Show(g_Game.ReportModded());
764 m_ImageLogoMid.Show(true);
765 m_ImageLogoCorner.Show(false);
766
767 m_ImageWidgetBackground.Show(true);
768 m_Counter = 0;
769
770 // lighten up your desktop
771 game.GetBacklit().LoadingAnim();
772
775 }
776
778 void OnTimer();
779
780 void Inc()
781 {
782 m_LastProgressUpdate = m_DayZGame.GetTickTime();
783 m_Counter++;
784 if (m_Counter == 1)
785 {
786 Show();
787 }
788 }
789
790 void Dec()
791 {
792 m_Counter = m_Counter - 1;
793
794 if (m_Counter <= 0)
795 {
796 m_Counter = 0;
797 EndLoading();
798 m_HintPanel = null;
799 }
800 }
801
803 {
806 m_WidgetRoot.Show(false);
807 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).Call(g_Game.CheckDialogs);
808 }
809
811 {
812 return m_WidgetRoot.IsVisible();
813 }
814
815 void SetTitle(string title)
816 {
817 m_TextWidgetTitle.SetText(title);
818 }
819
820 void SetStatus(string status)
821 {
822 m_TextWidgetStatus.SetText(status);
823 }
824
825 void SetProgress(float val)
826 {
827 float time_delta = m_DayZGame.GetTickTime() - m_LastProgressUpdate;
828
829 m_LastProgressUpdate = m_DayZGame.GetTickTime();
830 }
831
832 void OnUpdate(float timeslice)
833 {
834
835 }
836
837 void ShowEx(DayZGame game)
838 {
839 if (!m_HintPanel)
840 {
841 m_HintPanel = new UiHintPanelLoading(m_WidgetRoot.FindAnyWidget("hint_frame"));
842 m_HintPanel.Init(game);
843 }
844
845 Show();
846 }
847
848 void Show()
849 {
852 m_ProgressText.SetText("");
853 m_ProgressLoading.SetCurrent(0.0);
854 m_ImageBackground.SetMaskProgress(0.0);
855
856 if (!m_WidgetRoot.IsVisible())
857 {
858 if (m_DayZGame.GetUIManager().IsDialogVisible())
859 {
860 m_DayZGame.GetUIManager().HideDialog();
861 }
862
863 if (m_DayZGame.GetMissionState() == DayZGame.MISSION_STATE_MAINMENU)
864 {
865 m_ImageLogoMid.Show(false);
866 m_ImageLogoCorner.Show(false);
867 m_ImageWidgetBackground.Show(true);
868 m_TextWidgetStatus.Show(true);
869 }
870 else
871 {
872 m_ImageLogoMid.Show(true);
873 m_ImageLogoCorner.Show(false);
874 m_ImageWidgetBackground.Show(true);
875 m_TextWidgetStatus.Show(false);
876 }
877
878 m_WidgetRoot.Show(true);
879 m_TextWidgetTitle.SetText("");
880 m_TextWidgetStatus.SetText("");
881 }
882
883 ProgressAsync.SetProgressData(pText);
884 ProgressAsync.SetUserData(lIcon);
885 }
886
887 void Hide(bool force)
888 {
889 if (force)
890 {
891 while (m_Counter > 0)
892 {
893 Dec();
894 }
895 }
896
897 if (m_Counter <= 0)
898 {
899 m_WidgetRoot.Show(false);
902 m_HintPanel = null;
903 }
904 }
905};
906
907
908class DayZGame extends CGame
909{
911
913 const int MISSION_STATE_GAME = 1;
915
917
918 private const int STATS_COUNT = EConnectivityStatType.COUNT;
919 private EConnectivityStatLevel m_ConnectivityStatsStates[STATS_COUNT];
920
921 private int m_MissionState;
922
923 //HK stuff
924 protected DayZGameState m_GameState;
925 protected DayZLoadState m_LoadState;
927 protected bool m_FirstConnect = true;
928 //End HK stuff
929
933 private int m_LoginTime;
934
936 private ref TimerQueue m_timerQueue[CALL_CATEGORY_COUNT];
940 private ref DragQueue m_dragQueue;
946 private string m_MissionPath;
947 private string m_MissionFolderPath;
948 private bool m_IsCtrlHolding;
949 private bool m_IsWinHolding;
950 private bool m_IsLeftAltHolding;
952
953 private bool m_IsWorldWetTempUpdateEnabled = true;
954 private bool m_IsFoodDecayEnabled = true;
955 private float m_FoodDecayModifier;
956
957 static bool m_ReportModded;
958 private bool m_IsStressTest;
961 private string m_PlayerName;
962 private bool m_IsNewCharacter;
963 private bool m_IsConnecting;
964 private bool m_ConnectFromJoin;
967 private int m_PreviousGamepad;
968 private float m_UserFOV;
969
970 private float m_DeltaTime;
971
972#ifdef ROBOCLIENT
973 bool m_IsRoboclient = false;
974#endif
975
981
983 float m_EVValue = 0;
984
985 #ifdef DIAG_DEVELOPER
986 private static ref ServerFpsStatsUpdatedEventParams m_ServerFpsStatsParams;
987 #endif
988
989 static ref AmmoCamParams m_AmmoShakeParams = new AmmoCamParams();//TODO: make static, reuse
990
992
993 private ref Backlit m_Backlit;
994
996 private ref array<int> m_ConnectedInputDeviceList; //has to be owned here, 'Input' is a native class
997
998 //Used for helicrash sound
1000
1001 //Used for Artillery sound
1003 private const int MIN_ARTY_SOUND_RANGE = 300; // The distance under which sound is no longer heard
1004
1007 #ifdef DEVELOPER
1008 static bool m_IsPreviewSpawn;
1009 #endif
1010 #ifdef DIAG_DEVELOPER
1011 ref CameraToolsMenuServer m_CameraToolsMenuServer;
1012 ref GeyserDebugData m_GeyserDiagData = new GeyserDebugData();
1013 #endif
1014
1015 // CGame override functions
1017 {
1019
1020#ifdef PLATFORM_CONSOLE
1021 SetMainMenuWorld("MainMenuSceneXbox");
1022#endif
1024
1025 m_keyboard_handler = null;
1026
1027 #ifdef DEVELOPER
1029 #endif
1030
1031 for (int i = 0; i < CALL_CATEGORY_COUNT; i++)
1032 {
1033 m_callQueue[i] = new ScriptCallQueue();
1034 m_updateQueue[i] = new ScriptInvoker();
1035 m_timerQueue[i] = new TimerQueue();
1036
1038 }
1039
1040 m_dragQueue = new DragQueue;
1041
1042 m_LoginTime = 0;
1043
1044 string tmp;
1045 if (CommandlineGetParam("stresstest", tmp))
1046 {
1047 m_IsStressTest = true;
1048 }
1049
1050 if (CommandlineGetParam("doAimLogs", tmp))
1051 {
1052 m_AimLoggingEnabled = true;
1053 }
1054
1055 // initialize backlit effects
1056 m_Backlit = new Backlit();
1057 m_Backlit.OnInit(this);
1058
1060
1061 #ifndef NO_GUI
1062 if (m_loading == null)
1063 {
1064 m_loading = new LoadingScreen(this);
1065 }
1066
1067 if (m_loading)
1068 {
1069 m_loading.ShowEx(this);
1070 }
1071
1073 #endif
1074
1075 Debug.Init();
1076 Component.Init();
1080 GetUApi().PresetSelect(GetUApi().PresetCurrent());
1081
1083
1084#ifdef ROBOCLIENT
1085 string roboclientValue;
1086 if (CommandlineGetParam("roboclient", roboclientValue))
1087 {
1088 m_IsRoboclient = true;
1089 }
1090#endif
1091
1092#ifndef SERVER
1094#endif
1095
1097
1098 string path = "cfgVehicles";
1099 string child_name = "";
1100 int count = ConfigGetChildrenCount(path);
1101
1102 for (int p = 0; p < count; ++p)
1103 {
1104 ConfigGetChildName(path, p, child_name);
1105
1106 if (ConfigGetInt(path + " " + child_name + " scope") != 2)
1107 continue;
1108
1109 if (!IsKindOf(child_name, "SurvivorBase"))
1110 continue;
1111
1112#ifdef USER_kumarjac
1113 if (child_name == "SurvivorF_Keiko")
1114 continue;
1115#endif
1116
1117 m_CharClassNames.Insert(child_name);
1118 }
1119
1120 m_IsConnecting = false;
1121 m_ConnectFromJoin = false;
1122 }
1123
1124 // ------------------------------------------------------------
1125 private void ~DayZGame()
1126 {
1130
1131 SetDispatcher(null);
1132 Print("~DayZGame()");
1133 }
1134
1135 // ------------------------------------------------------------
1156
1157 // ------------------------------------------------------------
1159 {
1160 if (GetCEApi())
1161 {
1162 m_IsWorldWetTempUpdateEnabled = (GetCEApi().GetCEGlobalInt("WorldWetTempUpdate") == 1);
1163
1164 m_FoodDecayModifier = GetCEApi().GetCEGlobalFloat("FoodDecay");
1165
1166 //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
1167 if (m_FoodDecayModifier == float.MIN)
1168 {
1169 m_FoodDecayModifier = GetCEApi().GetCEGlobalInt("FoodDecay");
1170 }
1171 }
1172
1173 //we need to perform the load here as some objects behaving correctly after spawn is dependent on CE being initialized before spawning them
1175 }
1176
1177 // ------------------------------------------------------------
1179 {
1180 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.CROSSHAIR, SHOW_CROSSHAIR);
1181 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.HUD, SHOW_HUD);
1182 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.HUD_VEHICLE, SHOW_HUD_VEHICLE);
1183 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.QUICKBAR, SHOW_QUICKBAR);
1184 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.SERVER_MESSAGES, SYSTEM_CHAT_MSG);
1185 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.USERS_CHAT, DIRECT_CHAT_MSG);
1186 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.RADIO_CHAT, RADIO_CHAT_MSG);
1187 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.GAME_MESSAGES, GAME_CHAT_MSG, false);
1188 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.ADMIN_MESSAGES, ADMIN_CHAT_MSG, false);
1189 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.PLAYER_MESSAGES, PLAYER_CHAT_MSG, false);
1190 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.SERVERINFO_DISPLAY, SHOW_SERVERINFO, true);
1191 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.BLEEDINGINDICATION, ENABLE_BLEEDINGINDICATION, true);
1192 m_DayZProfileOptions.RegisterProfileOptionBool(EDayZProfilesOptions.CONNECTIVITY_INFO, SHOW_CONNECTIVITYINFO, true);
1193
1194 m_DayZProfileOptions.RegisterProfileOptionFloat(EDayZProfilesOptions.HUD_BRIGHTNESS, HUD_BRIGHTNESS, 0.0);
1195
1196 m_DayZProfileOptions.RegisterProfileOptionInt(EDayZProfilesOptions.AMBIENT_MUSIC_MODE, OPTIONS_SOUND_AMBIENT_SOUND_MODE, 0);
1197 }
1198
1200 {
1201 m_DayZProfileOptions.ResetOptionsBool();
1202 m_DayZProfileOptions.ResetOptionsInt();
1203 m_DayZProfileOptions.ResetOptionsFloat();
1204 }
1205
1208 {
1210
1211 int pos_end = 0;
1212 int pos_cur = 0;
1213
1214 while (pos_cur != -1)
1215 {
1216 pos_end = pos_cur;
1217 pos_cur = path.IndexOfFrom(pos_cur + 1 , "\\");
1218 }
1219
1220 m_MissionFolderPath = path.Substring(0, pos_end);
1221 }
1222
1224 {
1225 return m_MissionPath;
1226 }
1227
1229 {
1230 return m_MissionFolderPath;
1231 }
1232
1233 override ScriptCallQueue GetCallQueue(int call_category)
1234 {
1235 return m_callQueue[call_category];
1236 }
1237
1238 override ScriptInvoker GetUpdateQueue(int call_category)
1239 {
1240 return m_updateQueue[call_category];
1241 }
1242
1243 override ScriptInvoker GetPostUpdateQueue(int call_category)
1244 {
1245 return m_postUpdateQueue[call_category];
1246 }
1247
1255
1256 override TimerQueue GetTimerQueue(int call_category)
1257 {
1258 return m_timerQueue[call_category];
1259 }
1260
1261 override DragQueue GetDragQueue()
1262 {
1263 return m_dragQueue;
1264 }
1265
1266 // ------------------------------------------------------------
1268 {
1269
1270 }
1271
1272
1273 // ------------------------------------------------------------
1275 {
1276 return m_MissionState;
1277 }
1278
1279 // ------------------------------------------------------------
1280 void SetMissionState(int state)
1281 {
1282 m_MissionState = state;
1283 }
1284
1285 // ------------------------------------------------------------
1287 {
1288 return m_DayZProfileOptions.GetProfileOption(option);
1289 }
1290
1292 {
1293 return GetProfileOption(option);
1294 }
1295
1297 {
1298 return m_DayZProfileOptions.GetProfileOptionInt(option);
1299 }
1300
1302 {
1303 return m_DayZProfileOptions.GetProfileOptionFloat(option);
1304 }
1305
1307 {
1308 return m_DayZProfileOptions.GetProfileOptionDefaultBool(option);
1309 }
1310
1312 {
1313 return GetProfileOptionDefault(option);
1314 }
1315
1317 {
1318 return m_DayZProfileOptions.GetProfileOptionDefaultInt(option);
1319 }
1320
1322 {
1323 return m_DayZProfileOptions.GetProfileOptionDefaultFloat(option);
1324 }
1325
1327 {
1328 m_DayZProfileOptions.SetProfileOptionBool(option, value);
1329 }
1330
1332 {
1333 SetProfileOption(option, value);
1334 }
1335
1337 {
1338 m_DayZProfileOptions.SetProfileOptionInt(option, value);
1339 }
1340
1342 {
1343 m_DayZProfileOptions.SetProfileOptionFloat(option, value);
1344 }
1345
1350
1352 {
1353 return m_IsStressTest;
1354 }
1355
1357 {
1358 return m_AimLoggingEnabled;
1359 }
1360
1361 void SetGameState(DayZGameState state)
1362 {
1363 m_GameState = state;
1364 }
1365
1366 DayZGameState GetGameState()
1367 {
1368 return m_GameState;
1369 }
1370
1371 void SetLoadState(DayZLoadState state)
1372 {
1373 m_LoadState = state;
1374 }
1375
1376 DayZLoadState GetLoadState()
1377 {
1378 return m_LoadState;
1379 }
1380
1381 static bool ReportModded()
1382 {
1383 return m_ReportModded;
1384 }
1385
1387 {
1388 return m_Backlit;
1389 }
1390
1391 // ------------------------------------------------------------
1392 override bool IsInventoryOpen()
1393 {
1394#ifndef NO_GUI
1395 if (GetUIManager().FindMenu(MENU_INVENTORY) != NULL)
1396 {
1397 return true;
1398 }
1399#endif
1400 return false;
1401 }
1402
1403 // ------------------------------------------------------------
1405 {
1407 {
1408 g_Game.GetUIManager().EnterScriptedMenu(MENU_EARLYACCESS, parent);
1410 }
1411 }
1412
1413 // ------------------------------------------------------------
1416 {
1417 #ifndef NO_GUI
1419 if (mission)
1420 {
1421 return mission.CreateScriptedMenu(id);
1422 }
1423 #endif
1424 return NULL;
1425 }
1426
1427 // ------------------------------------------------------------
1429 {
1430 #ifdef ENABLE_LOGGING
1431 Print("Reloading mission module!");
1433 #endif
1434 }
1435
1436 // ------------------------------------------------------------
1438 {
1439 if (m_LoginQueue)
1440 {
1441 if (m_LoginQueue.IsStatic())
1442 {
1443 m_LoginQueue.Hide();
1444 delete m_LoginQueue;
1445 }
1446 else
1447 {
1448 m_LoginQueue.Close();
1449 }
1450 }
1451 }
1452 // ------------------------------------------------------------
1454 {
1456
1458 {
1459 if (m_LoginTimeScreen.IsStatic())
1460 {
1461 m_LoginTimeScreen.Hide();
1462 delete m_LoginTimeScreen;
1463 }
1464 else
1465 {
1466 m_LoginTimeScreen.Close();
1467 }
1468 }
1469 }
1470 // ------------------------------------------------------------
1472 {
1473 for (int i = 0; i < STATS_COUNT; i++)
1475 }
1476
1477
1478 // ------------------------------------------------------------
1479 override void OnEvent(EventType eventTypeId, Param params)
1480 {
1481 string address;
1482 int port;
1483 int high, low;
1484
1485 switch (eventTypeId)
1486 {
1487 case StartupEventTypeID:
1488 {
1489 #ifndef SERVER
1490 #ifndef NO_GUI
1491 // Just call it, to create the global instance if it doesn't exist yet
1492 ParticleManager.GetInstance();
1493 #endif
1494 #endif
1495 break;
1496 }
1498 {
1499 #ifndef SERVER
1501 #endif
1502 m_FirstConnect = true;
1504 break;
1505 }
1507 {
1508 LoadingHide();
1510 SetConnecting(false);
1511 SetGameState(DayZGameState.MAIN_MENU);
1512 m_FirstConnect = true;
1513 #ifdef PLATFORM_CONSOLE
1514 if (GetUserManager().GetSelectedUser())
1515 {
1518 if (GetGameState() == DayZGameState.IN_GAME)
1519 {
1520 SetLoadState(DayZLoadState.MAIN_MENU_START);
1521 }
1522 }
1523 m_Notifications.ClearVoiceNotifications();
1524 #endif
1525
1526 // analytics - disconnected player
1528 discData.m_CharacterId = g_Game.GetDatabaseID();
1529 discData.m_Reason = "quit";
1530 Analytics.PlayerDisconnected(discData);
1531 break;
1532 }
1534 {
1536 LoadingHide(true);
1537 SetConnecting(false);
1539
1540 if (GetGameState() == DayZGameState.CONNECTING)
1541 {
1542 SetGameState(DayZGameState.MAIN_MENU);
1543 }
1544
1545 break;
1546 }
1548 {
1549 LoadingHide(true);
1551
1552 SetGameState(DayZGameState.IN_GAME);
1553 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(g_Game.GetMission().GetOnInputDeviceDisconnected().Invoke, 100, false, -1);
1554
1555 // analytics - spawned
1557 spawnData.m_CharacterId = g_Game.GetDatabaseID();
1558 spawnData.m_Lifetime = 0;
1559 spawnData.m_Position = vector.Zero;
1560 if (GetPlayer())
1561 {
1562 spawnData.m_Position = GetPlayer().GetPosition();
1563 }
1564 spawnData.m_DaytimeHour = 0;
1565 spawnData.m_Population = 0;
1566 Analytics.PlayerSpawned(spawnData);
1567
1568 #ifdef PLATFORM_CONSOLE
1569 m_Notifications.ClearVoiceNotifications();
1571 #endif
1572 if (m_FirstConnect)
1573 {
1574 m_FirstConnect = false;
1575 if (GetHostAddress(address, port))
1576 {
1577 AddVisitedServer(address, port);
1578 }
1579
1580 #ifdef PLATFORM_CONSOLE
1581 #ifndef PLATFORM_WINDOWS // if app is not on Windows with -XBOX parameter
1582 if (null != GetUserManager().GetSelectedUser())
1583 {
1586 }
1587 #endif
1588 #endif
1589 }
1590
1592
1593 break;
1594 }
1596 {
1597 MPConnectionLostEventParams conLost_params;
1598 if (Class.CastTo(conLost_params, params))
1599 {
1600 int duration = conLost_params.param1;
1601 OnMPConnectionLostEvent(duration);
1602 }
1603 break;
1604 }
1606 {
1607 LoadingShow();
1608 break;
1609 }
1611 {
1613 break;
1614 }
1616 {
1617 ChatMessageEventParams chat_params;
1618 if (Class.CastTo(chat_params, params))
1619 {
1620
1621 }
1622 break;
1623 }
1625 {
1626 ProgressEventParams prog_params;
1627 if (Class.CastTo(prog_params, params))
1628 LoadProgressUpdate(prog_params.param1, prog_params.param2, prog_params.param3);
1629 break;
1630 }
1632 {
1633 LoginTimeEventParams loginTimeParams;
1634 if (Class.CastTo(loginTimeParams, params))
1635 {
1636 OnLoginTimeEvent(loginTimeParams.param1);
1637 }
1638 break;
1639 }
1640 case RespawnEventTypeID:
1641 {
1642 RespawnEventParams respawnParams;
1643 if (Class.CastTo(respawnParams, params))
1644 {
1645 OnRespawnEvent(respawnParams.param1);
1646 }
1647 break;
1648 }
1649 case PreloadEventTypeID:
1650 {
1651 PreloadEventParams preloadParams;
1652 if (Class.CastTo(preloadParams, params))
1653 {
1654 OnPreloadEvent(preloadParams.param1);
1655 }
1656 break;
1657 }
1658 case LogoutEventTypeID:
1659 {
1660 LogoutEventParams logoutParams;
1661 if (Class.CastTo(logoutParams, params))
1662 {
1663 GetCallQueue(CALL_CATEGORY_GUI).Call(GetMission().StartLogoutMenu, logoutParams.param1);
1664 }
1665 break;
1666 }
1668 {
1670 break;
1671 }
1673 {
1674 LoginStatusEventParams loginStatusParams;
1675 Class.CastTo(loginStatusParams, params);
1676
1677 string msg1 = loginStatusParams.param1;
1678 string msg2 = loginStatusParams.param2;
1679 string finalMsg;
1680
1681 // write either to login time screen or loading screen
1683 {
1684 finalMsg = msg1;
1685 // login time screen supports two lines
1686 if (msg2.Length() > 0)
1687 finalMsg += "\n" + msg2;
1688
1689 m_LoginTimeScreen.SetStatus(finalMsg);
1690 }
1691 else if (m_loading)
1692 {
1693 // loading only one line, but it's a long one
1694 finalMsg = msg1 + " " + msg2;
1695 m_loading.SetStatus(finalMsg);
1696 }
1697 break;
1698 }
1700 {
1701 g_Game.SetGameState(DayZGameState.CONNECTING);
1702 SetConnecting(true);
1703 break;
1704 }
1706 {
1707 g_Game.SetGameState(DayZGameState.MAIN_MENU);
1708 SetConnecting(false);
1710 {
1711 m_ConnectFromJoin = false;
1712 AbortMission();
1713 }
1714 break;
1715 }
1717 {
1718 DLCOwnerShipFailedParams dlcParams;
1719 if (Class.CastTo(dlcParams, params))
1720 {
1721 Print("### DLC Ownership failed !!! Map: " + dlcParams.param1);
1722 }
1723 break;
1724 }
1726 {
1727 ConnectivityStatsUpdatedEventParams connectivityStatsParams;
1728 if (Class.CastTo(connectivityStatsParams, params))
1729 {
1730 PlayerIdentity playerIdentity = connectivityStatsParams.param1;
1731
1732 int pingAvg = playerIdentity.GetPingAvg();
1733 if (pingAvg < GetWorld().GetPingWarningThreshold())
1734 {
1735 SetConnectivityStatState(EConnectivityStatType.PING, EConnectivityStatLevel.OFF);
1736 }
1737 else if (pingAvg < GetWorld().GetPingCriticalThreshold())
1738 {
1739 SetConnectivityStatState(EConnectivityStatType.PING, EConnectivityStatLevel.LEVEL1);
1740 }
1741 else
1742 {
1743 SetConnectivityStatState(EConnectivityStatType.PING, EConnectivityStatLevel.LEVEL2);
1744 }
1745 }
1746 break;
1747 }
1749 {
1750 ServerFpsStatsUpdatedEventParams serverFpsStatsParams;
1751 if (Class.CastTo(serverFpsStatsParams, params))
1752 {
1753 #ifdef DIAG_DEVELOPER
1754 m_ServerFpsStatsParams = serverFpsStatsParams;
1755 #endif
1756 float fps = serverFpsStatsParams.param1;
1757 if (fps > GetWorld().GetServerFpsWarningThreshold())
1758 {
1759 SetConnectivityStatState(EConnectivityStatType.SERVER_PERF, EConnectivityStatLevel.OFF);
1760 }
1761 else if (fps > GetWorld().GetServerFpsCriticalThreshold())
1762 {
1763 SetConnectivityStatState(EConnectivityStatType.SERVER_PERF, EConnectivityStatLevel.LEVEL1);
1764 }
1765 else
1766 {
1767 SetConnectivityStatState(EConnectivityStatType.SERVER_PERF, EConnectivityStatLevel.LEVEL2);
1768 }
1769 }
1770 break;
1771 }
1772 }
1773
1774 VONManager.GetInstance().OnEvent(eventTypeId, params);
1775
1777 if (mission)
1778 {
1779 mission.OnEvent(eventTypeId, params);
1780 }
1781
1783 if (emh)
1784 emh.OnEvent(eventTypeId, params);
1785 }
1786
1787 void SetConnectivityStatState(EConnectivityStatType type, EConnectivityStatLevel level)
1788 {
1789 if (level != m_ConnectivityStatsStates[type])
1790 {
1791 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
1792 {
1793 m_ConnectivityStatsStates[type] = level;
1794 }
1795 }
1796 }
1797
1798 protected bool OnConnectivityStatChange(EConnectivityStatType type, EConnectivityStatLevel newLevel, EConnectivityStatLevel oldLevel)
1799 {
1800 if (!g_Game || !g_Game.GetMission())
1801 return false;
1802 Hud hud = g_Game.GetMission().GetHud();
1803 if (!hud)
1804 return false;
1805
1806 hud.SetConnectivityStatIcon(type, newLevel);
1807 return true;
1808 }
1809
1810 #ifdef DIAG_DEVELOPER
1811 private void DrawPerformanceStats(float pingAct, float pingAvg, float throttleInput, float throttleOutput)
1812 {
1813 DbgUI.Begin("Performance Stats", 720, 10);
1814 DbgUI.Text("pingAct:" + pingAct );
1815 int color = COLOR_WHITE;
1816 if ( pingAvg >= GetWorld().GetPingCriticalThreshold())
1817 color = COLOR_RED;
1818 else if ( pingAvg >= GetWorld().GetPingWarningThreshold())
1819 color = COLOR_YELLOW;
1820
1821 DbgUI.ColoredText(color, "pingAvg:" + pingAvg);
1822 DbgUI.Text("Ping Warning Threshold:" + GetWorld().GetPingWarningThreshold());
1823 DbgUI.Text("Ping Critical Threshold:" + GetWorld().GetPingCriticalThreshold());
1824 DbgUI.PlotLive("pingAvg history:", 300, 125, pingAvg, 100, 100 );
1825 DbgUI.Text("Server Fps Warning Threshold:" + GetWorld().GetServerFpsWarningThreshold());
1826 DbgUI.Text("Server Fps Critical Threshold:" + GetWorld().GetServerFpsCriticalThreshold());
1827 if (m_ServerFpsStatsParams)// SERVER FPS
1828 {
1829 color = COLOR_WHITE;
1830 if ( m_ServerFpsStatsParams.param1 <= GetWorld().GetServerFpsCriticalThreshold())
1831 color = COLOR_RED;
1832 else if ( m_ServerFpsStatsParams.param1 <= GetWorld().GetServerFpsWarningThreshold())
1833 color = COLOR_YELLOW;
1834
1835 DbgUI.ColoredText(color, "serverFPS:" + m_ServerFpsStatsParams.param1.ToString() );
1836 DbgUI.PlotLive("serverFPS history:", 300, 125, m_ServerFpsStatsParams.param1, 100, 100 );
1837
1838 color = COLOR_WHITE;
1839 DbgUI.ColoredText(COLOR_WHITE, "serverFrameTime:" + m_ServerFpsStatsParams.param2.ToString() );
1840 DbgUI.PlotLive("serverFrameTime history:", 300, 75, m_ServerFpsStatsParams.param2, 100, 100 );
1841
1842 color = COLOR_WHITE;
1843 if (m_ServerFpsStatsParams.param3 > 0)
1844 color = COLOR_RED;
1845
1846 DbgUI.ColoredText(color, "physStepsSkippedServer:" + m_ServerFpsStatsParams.param3.ToString() );
1847 DbgUI.PlotLive("physStepsSkippedServer history:", 300, 75, m_ServerFpsStatsParams.param3, 100, 100 );
1848
1849 color = COLOR_WHITE;
1850 if (m_ServerFpsStatsParams.param4 > 0)
1851 color = COLOR_RED;
1852 DbgUI.ColoredText(color, "physStepsSkippedClient:" + m_ServerFpsStatsParams.param4.ToString() );
1853 DbgUI.PlotLive("physStepsSkippedClient history:", 300, 75, m_ServerFpsStatsParams.param4, 100, 100 );
1854 }
1855
1856 DbgUI.Text("throttleInput:" + throttleInput);
1857 DbgUI.PlotLive("throttleInput history:", 300, 75, throttleInput, 100, 50 );
1858 DbgUI.Text("throttleOutput:" + throttleOutput);
1859 DbgUI.PlotLive("throttleOutput history:", 300, 75, throttleOutput, 100, 50 );
1860 DbgUI.End();
1861 }
1862 #endif
1863
1865 {
1866 m_Notifications.AddVoiceNotification(vonStartParams.param2, vonStartParams.param1);
1867 }
1868
1870 {
1871 m_Notifications.RemoveVoiceNotification(vonStopParams.param2);
1872 }
1873
1874 // ------------------------------------------------------------
1875 void UpdateLoginQueue(float timeslice)
1876 {
1877 int pos = GetUIManager().GetLoginQueuePosition();
1878
1880 if (!m_LoginQueue && pos > 0)
1881 {
1883
1884 if (GetMission())
1885 {
1886 UIScriptedMenu parent = GetUIManager().GetMenu();
1887 EnterLoginQueue(parent);
1888 }
1889 else
1890 {
1891 m_LoginQueue = new LoginQueueStatic();
1893 }
1894 }
1895 if (m_LoginQueue)
1896 {
1897 m_LoginQueue.SetPosition(pos);
1898
1900 LoginQueueStatic loginQueue;
1901 if (LoginQueueBase.CastTo(loginQueue, m_LoginQueue))
1902 {
1903 loginQueue.Update(timeslice);
1904 }
1905 }
1906 }
1907
1908 // ------------------------------------------------------------
1909 void OnLoginTimeEvent(int loginTime)
1910 {
1911#ifndef NO_GUI
1912 // remove login queue if exits
1914
1916
1917 m_LoginTime = loginTime;
1918
1919 // timer for login
1920 if (m_LoginTime > 0)
1921 {
1922 if (!m_LoginTimeScreen)
1923 {
1925
1926 if (GetMission())
1927 {
1928 UIScriptedMenu parent = GetUIManager().GetMenu();
1929 EnterLoginTime(parent);
1930 }
1931 else
1932 {
1933 m_LoginTimeScreen = new LoginTimeStatic();
1935 }
1936 }
1937
1939 m_LoginTimeScreen.Show();
1940
1942 }
1943#endif
1944 }
1945
1946 // ------------------------------------------------------------
1948 {
1949 if (m_LoginTime > 0)
1950 {
1953
1954 m_LoginTime--;
1955 }
1956 else
1957 {
1958 // stop the call loop
1960 }
1961 }
1962
1963 // ------------------------------------------------------------
1964 void OnRespawnEvent(int time)
1965 {
1966 // use login time screen for respawn timer
1967 if (time >= 0)
1968 {
1969 m_LoginTime = time;
1970#ifndef NO_GUI
1971 if (!m_LoginTimeScreen)
1972 {
1974
1975 UIScriptedMenu parent = GetUIManager().GetMenu();
1976 EnterLoginTime(parent);
1977 }
1978
1979 m_LoginTimeScreen.SetRespawn(true);
1981 m_LoginTimeScreen.Show();
1982#endif
1983
1985 }
1986
1987 if (GetPlayer())
1989
1990 PPERequesterBank.GetRequester(PPERequester_DeathDarkening).Start(new Param1<float>(1.0));
1991 }
1992
1993 // ------------------------------------------------------------
1995 {
1996 // cancel only login time (respawn time is parallel with preload, but login time is not)
1997 if (m_LoginTimeScreen && !m_LoginTimeScreen.IsRespawn())
1999
2000 // tell game to continue
2002 }
2003
2004 // ------------------------------------------------------------
2005 // Serialize and send default character information to server (must be called)
2007 {
2009
2010 //GetMenuData().RequestGetDefaultCharacterData();
2013 }
2014
2015 // ------------------------------------------------------------
2017 {
2018 m_LoginQueue = LoginQueueBase.Cast(GetUIManager().EnterScriptedMenu(MENU_LOGIN_QUEUE, parent));
2019 }
2020
2021 // ------------------------------------------------------------
2023 {
2024 m_LoginTimeScreen = LoginTimeBase.Cast(GetUIManager().EnterScriptedMenu(MENU_LOGIN_TIME, parent));
2025 }
2026
2027 // ------------------------------------------------------------
2028 void OnMPConnectionLostEvent(int duration)
2029 {
2030 if (duration >= 0)//(-1 means conn. reestablished)
2031 SetConnectivityStatState(EConnectivityStatType.CONN_LOST, EConnectivityStatLevel.LEVEL1);
2032 else
2033 SetConnectivityStatState(EConnectivityStatType.CONN_LOST, EConnectivityStatLevel.OFF);
2034
2035 #ifdef PLATFORM_PS4
2036 //PSN Set multiplay state
2037 if (duration < 0 && GetGameState() == DayZGameState.IN_GAME)
2038 {
2040 }
2041 else
2042 {
2044 }
2045 #endif
2046 }
2047
2048 // ------------------------------------------------------------
2049 void LoadProgressUpdate(int progressState, float progress, string title)
2050 {
2051 #ifndef NO_GUI
2052 switch (progressState)
2053 {
2054 case PROGRESS_START:
2055 {
2056 #ifndef NO_GUI
2057 // get out of the black screen immediately
2059 #endif
2060 m_loading.Inc();
2061 m_loading.SetTitle(title);
2062 if (m_loading.m_HintPanel)
2063 m_loading.m_HintPanel.ShowRandomPage();
2064
2065 }
2066 break;
2067
2068 case PROGRESS_FINISH:
2069 {
2070 m_loading.Dec();
2071 }
2072 break;
2073
2074 case PROGRESS_PROGRESS:
2075 {
2076 m_loading.SetProgress(progress);
2077
2078 }
2079 break;
2080
2081 case PROGRESS_UPDATE:
2082 {
2083 m_loading.SetProgress(0);
2084 }
2085 break;
2086 }
2087 #endif
2088 }
2089
2090 // ------------------------------------------------------------
2091 override void OnAfterCreate()
2092 {
2093 Math.Randomize(-1);
2094 }
2095
2096 // ------------------------------------------------------------
2097 override void OnActivateMessage()
2098 {
2100 }
2101
2102 // ------------------------------------------------------------
2103 override void OnDeactivateMessage()
2104 {
2106 }
2107
2108 // ------------------------------------------------------------
2109 override bool OnInitialize()
2110 {
2112
2115
2117 m_Visited = new TStringArray;
2118 GetProfileStringList("SB_Visited", m_Visited);
2119
2120 if (GetLoadState() == DayZLoadState.UNDEFINED)
2121 {
2122 string param;
2123
2124 if (GetCLIParam("join", param))
2125 {
2126 JoinLaunch();
2127 #ifndef PLATFORM_PS4
2129 #endif
2130 }
2131 else if (GetCLIParam("connect", param))
2132 {
2133 ConnectLaunch();
2134 }
2135 else if (GetCLIParam("autotest", param))
2136 {
2137 AutoTestLaunch(param);
2138 }
2139 else if (GetCLIParam("mission", param))
2140 {
2141 MissionLaunch();
2142 }
2143 else if (GetCLIParam("party", param))
2144 {
2145 PartyLaunch();
2146 }
2147 else
2148 {
2150 }
2151
2152 return true;
2153 }
2154
2155 return false;
2156 }
2157
2163
2164 protected ref Widget m_IntroMenu;
2165 protected ref Widget m_GamepadDisconnectMenu; //DEPRECATED
2166 protected int m_PrevBlur;
2167
2168 protected string m_DatabaseID;
2169
2170 protected string m_ConnectAddress;
2171 protected int m_ConnectPort;
2173 protected string m_ConnectPassword;
2174
2175 protected const int MAX_VISITED = 50;
2177
2179 {
2180 return m_DatabaseID;
2181 }
2182
2183 void SetDatabaseID(string id)
2184 {
2185 m_DatabaseID = id;
2186
2187#ifdef NO_GUI
2188 return;
2189#endif
2190
2191 if (GetUIManager().GetMenu())
2192 {
2194 }
2195 }
2196
2198 {
2200 m_IntroMenu = GetWorkspace().CreateWidgets("gui/layouts/xbox/day_z_title_screen.layout");
2201 RichTextWidget text_widget = RichTextWidget.Cast(m_IntroMenu.FindAnyWidget("InputPromptText"));
2202 m_IntroMenu.FindAnyWidget("notification_root").Show(false);
2203 if (text_widget)
2204 {
2205 string text = Widget.TranslateString("#console_start_game");
2206 #ifdef PLATFORM_XBOX
2207 BiosUserManager user_manager = g_Game.GetUserManager();
2208 if (user_manager && user_manager.GetSelectedUser())
2209 text_widget.SetText(string.Format(text, "<image set=\"xbox_buttons\" name=\"A\" />"));
2210 else
2211 text_widget.SetText(string.Format(text, "<image set=\"xbox_buttons\" name=\"A\" />"));
2212 #endif
2213
2214 #ifdef PLATFORM_PS4
2215 string confirm = "cross";
2216 if (g_Game.GetInput().GetEnterButton() == GamepadButton.A)
2217 {
2218 confirm = "cross";
2219 }
2220 else
2221 {
2222 confirm = "circle";
2223 }
2224 text_widget.SetText(string.Format(text, "<image set=\"playstation_buttons\" name=\"" + confirm + "\" />"));
2225 #endif
2226 }
2227
2228 #ifdef PLATFORM_CONSOLE
2229 #ifdef PLATFORM_XBOX
2230 #ifdef BUILD_EXPERIMENTAL
2231 m_IntroMenu.FindAnyWidget("notification_root").Show(true);
2232 #endif
2233 #endif
2234 #endif
2235 }
2236
2238 {
2239 if (m_IntroMenu)
2240 {
2241 delete m_IntroMenu;
2242 }
2243 }
2244
2249
2251 {
2252 #ifdef PLATFORM_CONSOLE
2253 #ifndef AUTOTEST
2255 {
2258 {
2260 }
2261 }
2262 #endif
2263 #endif
2264 }
2265
2267 {
2268 SetGameState(DayZGameState.JOIN);
2269 SetLoadState(DayZLoadState.JOIN_START);
2270
2271 #ifdef PLATFORM_CONSOLE
2272 string join_param;
2273 if (GetCLIParam("join", join_param))
2274 {
2275 BiosUserManager user_manager = GetUserManager();
2276 user_manager.ParseJoinAsync(join_param);
2277 }
2278 #endif
2279 }
2280
2282 {
2283 BiosUserManager user_manager = GetUserManager();
2284 if (user_manager.GetTitleInitiator())
2285 {
2286 user_manager.SelectUserEx(user_manager.GetTitleInitiator());
2287 }
2288
2289 SetGameState(DayZGameState.CONNECT);
2290 SetLoadState(DayZLoadState.CONNECT_START);
2291
2292 #ifndef PLATFORM_WINDOWS
2293 #ifdef PLATFORM_CONSOLE
2295 GamepadCheck();
2296 #endif
2297 #else
2299 #endif
2300 }
2301
2303 {
2304 SetGameState(DayZGameState.PARTY);
2305 SetLoadState(DayZLoadState.PARTY_START);
2306 BiosUserManager user_manager = g_Game.GetUserManager();
2307
2308 string param;
2309 if (GetCLIParam("party", param))
2310 {
2311 user_manager.ParsePartyAsync(param);
2313 }
2314 }
2315
2317 {
2318#ifdef PLATFORM_WINDOWS
2319 BiosUserManager user_manager = GetUserManager();
2320 if (user_manager)
2321 {
2322 if (user_manager.GetTitleInitiator())
2323 {
2324 user_manager.SelectUserEx(user_manager.GetTitleInitiator());
2325 }
2326 }
2327#endif
2328
2329 SetGameState(DayZGameState.MAIN_MENU);
2330 SetLoadState(DayZLoadState.MAIN_MENU_START);
2333 }
2334
2336 {
2337 BiosUserManager user_manager = GetUserManager();
2338 if (user_manager)
2339 {
2340 if (user_manager.GetTitleInitiator())
2341 {
2342 user_manager.SelectUserEx(user_manager.GetTitleInitiator());
2343 }
2344 }
2345
2346 SetGameState(DayZGameState.IN_GAME);
2347 SetLoadState(DayZLoadState.MISSION_START);
2348
2349 #ifndef PLATFORM_WINDOWS
2350 #ifdef PLATFORM_CONSOLE
2351 #ifndef DEVELOPER
2353 GamepadCheck();
2354 return;
2355 #endif
2356 #endif
2357 #endif
2358
2359 string mission;
2360 GetCLIParam("mission", mission);
2362 }
2363
2364 void AutoTestLaunch(string param)
2365 {
2366 if (!AutotestConfigHandler.LoadData(param))
2367 AutoTestFixture.LogRPT("Failed to load autotest configuration, continue with mission load.");
2368 else
2369 m_AutotestEnabled = true;
2370
2371 string mission;
2372 GetCLIParam("mission", mission);
2373 if (!mission)
2374 {
2375 AutoTestFixture.LogRPT("Parameter 'mission' is not set on CLI.");
2377 }
2378
2380 }
2381
2382 void SelectUser(int gamepad = -1)
2383 {
2384 BiosUserManager user_manager = GetUserManager();
2385 if (user_manager)
2386 {
2387 BiosUser selected_user;
2388 if (gamepad > -1)
2389 {
2390 GetInput().GetGamepadUser(gamepad, selected_user);
2391 #ifdef PLATFORM_PS4
2392 if (selected_user)
2393 #endif
2394 {
2395 if (user_manager.SelectUserEx(selected_user))
2396 {
2397 g_Game.GetInput().IdentifyGamepad(GamepadButton.BUTTON_NONE);
2398 GetInput().SelectActiveGamepad(gamepad);
2399 }
2400 else
2401 {
2402 selected_user = user_manager.GetSelectedUser();
2403 }
2404
2405 #ifdef PLATFORM_PS4
2406 if (!selected_user.IsOnline())
2407 {
2408 user_manager.LogOnUserAsync(selected_user);
2409 return;
2410 }
2411 #endif
2412 }
2413 #ifdef PLATFORM_PS4
2414 else
2415 {
2417 GamepadCheck();
2418 }
2419 #endif
2420 }
2421
2422 if (!selected_user)
2423 selected_user = user_manager.GetSelectedUser();
2424
2425 if (!selected_user)
2426 {
2427 user_manager.PickUserAsync();
2428 return;
2429 }
2430
2431 user_manager.SelectUserEx(selected_user);
2432
2433 switch (GetLoadState())
2434 {
2435 case DayZLoadState.JOIN_START:
2436 {
2437 SetLoadState(DayZLoadState.JOIN_USER_SELECT);
2438 break;
2439 }
2440 case DayZLoadState.PARTY_START:
2441 {
2442 SetLoadState(DayZLoadState.PARTY_USER_SELECT);
2443 break;
2444 }
2445 case DayZLoadState.MAIN_MENU_START:
2446 {
2447 SetLoadState(DayZLoadState.MAIN_MENU_USER_SELECT);
2448 break;
2449 }
2450 case DayZLoadState.CONNECT_START:
2451 {
2452 SetLoadState(DayZLoadState.CONNECT_USER_SELECT);
2453 break;
2454 }
2455 case DayZLoadState.MISSION_START:
2456 {
2457 SetLoadState(DayZLoadState.MISSION_USER_SELECT);
2458 break;
2459 }
2460 default:
2461 break;
2462 }
2463
2464 SelectGamepad();
2465 g_Game.SetHudBrightness(g_Game.GetHUDBrightnessSetting());
2466 }
2467 }
2468
2469 void SetPreviousGamepad(int gamepad)
2470 {
2471 m_PreviousGamepad = gamepad;
2472 }
2473
2475 {
2476 return m_PreviousGamepad;
2477 }
2478
2480 {
2481#ifdef PLATFORM_MSSTORE
2482 // MS Store build always has user selected at this point. So just proceed.
2483 // This imitates the behavior when a gamepad is already selected.
2485 SelectUser();
2486 return;
2487#endif
2488
2489#ifndef AUTOTEST
2490 if (GetInput().IsActiveGamepadSelected())
2491 {
2492#endif
2494 SelectUser();
2495#ifndef AUTOTEST
2496 }
2497 else
2498 {
2499 #ifdef PLATFORM_CONSOLE
2500 #ifndef PLATFORM_WINDOWS
2501 #ifdef PLATFORM_PS4
2502 if (GetUserManager().GetSelectedUser())
2503 {
2504 int gamepad = GetInput().GetUserGamepad(GetUserManager().GetSelectedUser());
2505 if (gamepad > -1)
2506 {
2507 SelectUser(gamepad);
2508 }
2509 else
2510 {
2511 if (!m_IntroMenu && !(g_Game.GetUIManager().GetMenu() && g_Game.GetUIManager().GetMenu().GetID() == MENU_TITLE_SCREEN))
2513 g_Game.GetInput().IdentifyGamepad(g_Game.GetInput().GetEnterButton());
2514 }
2515 }
2516 else
2517 #endif
2518 {
2519 if (!m_IntroMenu && !(GetUIManager().GetMenu() && GetUIManager().GetMenu().GetID() == MENU_TITLE_SCREEN))
2521 GetInput().IdentifyGamepad(GetInput().GetEnterButton());
2522 }
2523 #endif
2524 #endif
2525 }
2526#endif
2527 }
2528
2530 {
2532 BiosUserManager user_manager = GetUserManager();
2533
2534 if (user_manager)
2535 {
2536 BiosUser selected_user = user_manager.GetSelectedUser();
2537 if (selected_user)
2538 {
2539 OnlineServices.SetBiosUser(selected_user);
2540 SetPlayerName(selected_user.GetName());
2542 #ifdef PLATFORM_CONSOLE
2543 SetPlayerGameName(selected_user.GetName());
2544 user_manager.GetUserDatabaseIdAsync();
2545 #endif
2546 }
2547
2548 if (GetUIManager().GetMenu())
2549 {
2551 }
2552 }
2553
2554 switch (GetLoadState())
2555 {
2556 case DayZLoadState.JOIN_USER_SELECT:
2557 {
2558 SetLoadState(DayZLoadState.JOIN_CONTROLLER_SELECT);
2560 break;
2561 }
2562 case DayZLoadState.PARTY_USER_SELECT:
2563 {
2564 SetLoadState(DayZLoadState.PARTY_CONTROLLER_SELECT);
2567 break;
2568 }
2569 case DayZLoadState.CONNECT_USER_SELECT:
2570 {
2571 SetLoadState(DayZLoadState.CONNECT_CONTROLLER_SELECT);
2573 break;
2574 }
2575 case DayZLoadState.MAIN_MENU_USER_SELECT:
2576 {
2577 SetLoadState(DayZLoadState.MAIN_MENU_CONTROLLER_SELECT);
2580 break;
2581 }
2582 case DayZLoadState.MISSION_USER_SELECT:
2583 {
2584 SetLoadState(DayZLoadState.MISSION_CONTROLLER_SELECT);
2586 string mission;
2587 GetCLIParam("mission", mission);
2589 break;
2590 }
2591 }
2592 }
2593
2595 {
2596 if (GetLoadState() == DayZLoadState.JOIN_CONTROLLER_SELECT)
2597 {
2598 SetGameState(DayZGameState.CONNECTING);
2600 }
2601 else
2602 {
2603 if (GetGameState() != DayZGameState.CONNECTING)
2604 {
2605 switch (GetLoadState())
2606 {
2607 case DayZLoadState.CONNECT_CONTROLLER_SELECT:
2608 {
2609 SetGameState(DayZGameState.CONNECTING);
2611 break;
2612 }
2613 case DayZLoadState.PARTY_CONTROLLER_SELECT:
2614 {
2615 SetGameState(DayZGameState.CONNECTING);
2616 Connect();
2617 break;
2618 }
2619 case DayZLoadState.MAIN_MENU_CONTROLLER_SELECT:
2620 {
2621 SetGameState(DayZGameState.CONNECTING);
2622 Connect();
2623 break;
2624 }
2625 }
2626 }
2627 else
2628 {
2629 string address;
2630 int port;
2631 if (GetHostAddress(address, port))
2632 {
2633 if (m_ConnectAddress == address && m_ConnectPort == port)
2634 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING_THIS);
2635 else
2636 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING, string.Format("%1:%2", address, port));
2637 }
2638 else
2639 {
2642 TryConnect();
2643 }
2644 }
2645 }
2646 }
2647
2648 bool GetLastVisitedServer(out string ip, out int port)
2649 {
2650 if (m_Visited)
2651 {
2652 if (m_Visited.Count() > 0)
2653 {
2654 string uid = m_Visited.Get(m_Visited.Count() - 1);
2655 TStringArray output = new TStringArray;
2656 uid.Split(":", output);
2657 ip = output[0];
2658 port = output[1].ToInt();
2659 return true;
2660 }
2661 }
2662 return false;
2663 }
2664
2665 void AddVisitedServer(string ip, int port)
2666 {
2667 string uid = ip + ":" + port;
2668 if (m_Visited)
2669 {
2670 int pos = m_Visited.Find(uid);
2671
2672 if (pos < 0)
2673 {
2674 if (m_Visited.Count() == MAX_VISITED)
2675 m_Visited.Remove(0);
2676 m_Visited.Insert(uid);
2677 }
2678 else
2679 {
2680 // if item is not saved as last server, move it
2681 if (pos != (m_Visited.Count() - 1))
2682 {
2683 m_Visited.Remove(pos);
2684 m_Visited.Insert(uid);
2685 }
2686 }
2687 SetProfileStringList("SB_Visited", m_Visited);
2688 SaveProfile();
2689 }
2690 }
2691
2692 bool IsVisited(string ip, int port)
2693 {
2694 string uid = ip + ":" + port;
2695 int index = m_Visited.Find(uid);
2696 return (index >= 0);
2697 }
2698
2700 {
2701 string addr;
2702 int port;
2703 if (GetHostAddress(addr, port))
2704 {
2705 m_ConnectAddress = addr;
2706 m_ConnectPort = port;
2707 }
2709 }
2710
2711 void Connect()
2712 {
2713 SetConnecting(true);
2714
2716 string addr;
2717 int port;
2718 if (GetHostAddress(addr, port))
2719 {
2720 if (m_ConnectAddress == addr && m_ConnectPort == port)
2721 return;
2722 }
2723
2724 string connectAddress = m_ConnectAddress;
2725
2727 connectAddress = string.Format("%1:%2:%3", m_ConnectAddress, m_ConnectPort, m_ConnectSteamQueryPort);
2728
2729 if (Connect(GetUIManager().GetMenu(), connectAddress, m_ConnectPort, m_ConnectPassword) != 0)
2731 }
2732
2733 void DisconnectSessionScript(bool displayJoinError = false)
2734 {
2735 DisconnectSessionFlags flags = DisconnectSessionFlags.SELECT_USER | DisconnectSessionFlags.IGNORE_WHEN_IN_GAME;
2736 if (displayJoinError)
2737 {
2738 flags |= DisconnectSessionFlags.JOIN_ERROR_ENABLED;
2739 flags |= DisconnectSessionFlags.JOIN_ERROR_CHECK;
2740 }
2741
2742 DisconnectSessionEx(flags);
2743 }
2744
2746 {
2747 if (flags & DisconnectSessionFlags.SELECT_USER && OnlineServices.GetBiosUser())
2748 {
2749 g_Game.GetUserManager().SelectUserEx(OnlineServices.GetBiosUser());
2750 }
2751
2752 if (flags & DisconnectSessionFlags.JOIN_ERROR_ENABLED)
2753 {
2754 if (!(flags & DisconnectSessionFlags.JOIN_ERROR_CHECK) || GetGameState() == DayZGameState.JOIN)
2755 {
2757 }
2758 }
2759
2760 if (flags & DisconnectSessionFlags.IGNORE_WHEN_IN_GAME && GetGameState() == DayZGameState.IN_GAME)
2761 {
2762 return;
2763 }
2764
2765 if (flags & DisconnectSessionFlags.CLOSE_MENUS && g_Game.GetUIManager())
2766 {
2767 g_Game.GetUIManager().CloseAllSubmenus();
2768
2769 if ( g_Game.GetUIManager().IsDialogVisible() )
2770 {
2771 g_Game.GetUIManager().CloseDialog();
2772 }
2773 }
2774
2775 if (flags & DisconnectSessionFlags.ALWAYS_FORCE)
2776 {
2778 }
2779
2780 if (g_Game.GetMission())
2781 {
2782 if (g_Game.GetGameState() != DayZGameState.MAIN_MENU)
2783 {
2784 if (flags & DisconnectSessionFlags.DISCONNECT_ERROR_ENABLED)
2785 {
2787 }
2788
2789 g_Game.GetMission().AbortMission();
2790
2791 SetGameState(DayZGameState.MAIN_MENU);
2792 SetLoadState(DayZLoadState.MAIN_MENU_CONTROLLER_SELECT);
2793
2794 GamepadCheck();
2795 }
2796 }
2797
2798 else
2799 {
2801 }
2802 }
2803
2804 void ConnectFromServerBrowser(string ip, int port, string password = "")
2805 {
2806 m_ConnectAddress = ip;
2807 m_ConnectPort = port;
2808 m_ConnectPassword = password;
2809 m_ConnectFromJoin = false;
2811 }
2812
2813 void ConnectFromServerBrowserEx(string ip, int port, int steamQueryPort, string password = "")
2814 {
2815 m_ConnectSteamQueryPort = steamQueryPort;
2816 ConnectFromServerBrowser(ip, port, password);
2817 }
2818
2819 void ConnectFromJoin(string ip, int port)
2820 {
2821 m_ConnectAddress = ip;
2822 m_ConnectPort = port;
2823 m_ConnectFromJoin = true;
2824 Connect();
2825 }
2826
2828 {
2829 string port;
2830 if (GetCLIParam("connect", m_ConnectAddress))
2831 {
2832 GetCLIParam("port", port);
2833 m_ConnectPort = port.ToInt();
2834
2835 GetCLIParam("password", m_ConnectPassword);
2836
2837 m_ConnectFromJoin = false;
2838 Connect();
2839 }
2840 }
2841
2843 {
2844 return m_IsCtrlHolding;
2845 }
2846
2847 // ------------------------------------------------------------
2848 override void OnKeyPress(int key)
2849 {
2850#ifdef DIAG_DEVELOPER
2851 GizmoApi gizmoApi = GetGizmoApi();
2852 if (gizmoApi)
2853 {
2854 if (key == KeyCode.KC_K)
2855 {
2856 GizmoTransformMode currentTransform = gizmoApi.GetTransformMode();
2857 if (currentTransform == GizmoTransformMode.NONE)
2858 {
2859 gizmoApi.SetTransformMode(GizmoTransformMode.MOVE);
2860 }
2861 else if (currentTransform == GizmoTransformMode.MOVE)
2862 {
2863 gizmoApi.SetTransformMode(GizmoTransformMode.ROTATE);
2864 }
2865 else if (currentTransform == GizmoTransformMode.ROTATE)
2866 {
2867 gizmoApi.SetTransformMode(GizmoTransformMode.SCALE);
2868 }
2869 else if (currentTransform == GizmoTransformMode.SCALE)
2870 {
2871 gizmoApi.SetTransformMode(GizmoTransformMode.NONE);
2872 }
2873 }
2874
2875 if (key == KeyCode.KC_L)
2876 {
2877 GizmoSpaceMode currentSpace = gizmoApi.GetSpaceMode();
2878 if (currentSpace == GizmoSpaceMode.LOCAL)
2879 {
2880 gizmoApi.SetSpaceMode(GizmoSpaceMode.WORLD);
2881 }
2882 else if (currentSpace == GizmoSpaceMode.WORLD)
2883 {
2884 gizmoApi.SetSpaceMode(GizmoSpaceMode.CAMERA);
2885 }
2886 else if (currentSpace == GizmoSpaceMode.CAMERA)
2887 {
2888 gizmoApi.SetSpaceMode(GizmoSpaceMode.LOCAL);
2889 }
2890 }
2891 }
2892#endif
2893
2894 if (key == KeyCode.KC_LCONTROL)
2895 {
2896 m_IsCtrlHolding = true;
2897 }
2898
2899 if (key == KeyCode.KC_LMENU)
2900 {
2901 m_IsLeftAltHolding = true;
2902 }
2903
2904 if (key == KeyCode.KC_RMENU)
2905 {
2906 m_IsRightAltHolding = true;
2907 }
2908
2910 {
2911 m_keyboard_handler.OnKeyDown(NULL, 0, 0, key);
2912 }
2913
2915 if (mission)
2916 {
2917 mission.OnKeyPress(key);
2918 }
2919
2920#ifdef DEVELOPER
2921 if ((m_IsLeftAltHolding || m_IsLeftAltHolding) && key == KeyCode.KC_F4)
2922 {
2923 RequestExit(0);
2924 }
2925#endif
2926
2927 }
2928
2929 // ------------------------------------------------------------
2930 override void OnKeyRelease(int key)
2931 {
2932 if (key == KeyCode.KC_LCONTROL)
2933 {
2934 m_IsCtrlHolding = false;
2935 }
2936
2937 if (key == KeyCode.KC_LWIN)
2938 {
2939 m_IsWinHolding = false;
2940 }
2941
2942 if (key == KeyCode.KC_LMENU || key == KeyCode.KC_RMENU)
2943 {
2944 m_IsLeftAltHolding = false;
2945 }
2946
2947 if (key == KeyCode.KC_RMENU)
2948 {
2949 m_IsRightAltHolding = false;
2950 }
2951
2953 {
2954 m_keyboard_handler.OnKeyUp(NULL, 0, 0, key);
2955 }
2956
2958 if (mission)
2959 {
2960 mission.OnKeyRelease(key);
2961 }
2962 }
2963
2964 // ------------------------------------------------------------
2965 override void OnMouseButtonPress(int button)
2966 {
2968 if (mission)
2969 {
2970 mission.OnMouseButtonPress(button);
2971 }
2972 }
2973
2974 // ------------------------------------------------------------
2975 override void OnMouseButtonRelease(int button)
2976 {
2978 if (mission)
2979 {
2980 mission.OnMouseButtonRelease(button);
2981 }
2982 }
2983
2984 // ------------------------------------------------------------
2985 override void OnDeviceReset()
2986 {
2987 m_IsCtrlHolding = false;
2988 m_IsWinHolding = false;
2989 m_IsLeftAltHolding = false;
2990 m_IsRightAltHolding = false;
2991 }
2992
2993 // ------------------------------------------------------------
2995 {
2996 return m_DeltaTime;
2997 }
2998
2999 // ------------------------------------------------------------
3000 override void OnUpdate(bool doSim, float timeslice)
3001 {
3002 m_DeltaTime = timeslice;
3003
3005 bool gameIsRunning = false;
3006
3007 if (doSim && mission)
3008 {
3009 if (!mission.IsPaused())
3010 gameIsRunning = true;
3011
3012 mission.OnUpdate(timeslice);
3013
3014 // update local weather effects
3015 if ( IsClient() || !IsMultiplayer() )
3016 {
3017 WorldData worldData = mission.GetWorldData();
3018 if ( worldData )
3019 worldData.UpdateWeatherEffects( GetWeather(), timeslice );
3020 }
3021 }
3022
3023 SEffectManager.OnUpdate(timeslice);
3024
3025 // queues and timers update
3028 GetTimerQueue(CALL_CATEGORY_SYSTEM).Tick(timeslice);
3029
3030 #ifndef NO_GUI
3031 if (m_IsConnecting)
3032 UpdateLoginQueue(timeslice);
3033
3034 if (m_loading && m_loading.IsLoading())
3035 {
3036 m_loading.OnUpdate(timeslice);
3037 }
3038 else if (m_LoginTimeScreen && m_LoginTimeScreen.IsStatic())
3039 {
3040 m_LoginTimeScreen.Update(timeslice);
3041 }
3042 else
3043 {
3046 GetTimerQueue(CALL_CATEGORY_GUI).Tick(timeslice);
3047 GetDragQueue().Tick();
3048 }
3049
3050 NotificationSystem.Update(timeslice);
3051 if (m_Notifications)
3052 {
3053 m_Notifications.Update(timeslice);
3054 }
3055
3056 #ifndef SERVER
3057 #ifdef DIAG_DEVELOPER
3058 if (g_Game.IsMultiplayer() && GetPlayer() && DiagMenu.GetBool(DiagMenuIDs.MISC_CONNECTION_STATS))
3059 {
3060 PlayerIdentity playerIdentity = GetPlayer().GetIdentity();
3061
3062 if (playerIdentity)
3063 {
3064 int pingAct = playerIdentity.GetPingAct();
3065 int pingAvg = playerIdentity.GetPingAvg();
3066
3067 float throttleInput = playerIdentity.GetInputThrottle();
3068 float throttleOutput = playerIdentity.GetOutputThrottle();
3069
3070 DrawPerformanceStats(pingAct, pingAvg, throttleInput, throttleOutput);
3071 }
3072 }
3073 #endif
3074 #endif
3075
3076 #endif
3077
3078 if (gameIsRunning)
3079 {
3082 GetTimerQueue(CALL_CATEGORY_GAMEPLAY).Tick(timeslice);
3083 }
3084 }
3085
3086 // ------------------------------------------------------------
3087 override void OnPostUpdate(bool doSim, float timeslice)
3088 {
3090 bool gameIsRunning = false;
3091
3092 if (doSim && mission && !mission.IsPaused())
3093 {
3094 gameIsRunning = true;
3095 }
3096
3098
3099 #ifndef NO_GUI
3100 if (m_loading && m_loading.IsLoading())
3101 {
3102 }
3103 else if (m_LoginTimeScreen && m_LoginTimeScreen.IsStatic())
3104 {
3105 }
3106 else
3107 {
3109 }
3110 #endif
3111
3112 if (gameIsRunning)
3113 {
3115 }
3116
3117 #ifndef NO_GUI
3118 if (mission)
3119 {
3120 Hud hud = mission.GetHud();
3121 if (hud)
3122 {
3123 hud.Update(timeslice);
3124 }
3125 }
3126 #endif
3127 }
3128
3129 protected void ForceOvercastReset()
3130 {
3131 Weather weather = g_Game.GetWeather();
3132 weather.GetOvercast().SetNextChange(0);
3133
3134 if (weather.GetSandstorm().IsActive())
3135 {
3136 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).RemoveByName(this, "ForceOvercastReset");
3137 }
3138 }
3139
3140 // ------------------------------------------------------------
3141 override void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
3142 {
3143 super.OnRPC(sender, target, rpc_type, ctx);
3144 Event_OnRPC.Invoke(sender, target, rpc_type, ctx);
3145
3146 //Print("["+ g_Game.GetTime().ToString() +"] => DayZGame::OnRPC = "+ EnumTools.EnumToString(ERPCs,rpc_type));
3147
3148 if (target)
3149 {
3150 // call rpc on target
3151 target.OnRPC(sender, rpc_type, ctx);
3152 }
3153 else
3154 {
3155 switch (rpc_type)
3156 {
3157 #ifndef SERVER
3158 #ifndef NO_GUI
3159 case ERPCs.RPC_CFG_GAMEPLAY_SYNC:
3160 {
3161 CfgGameplayHandler.OnRPC(null, ctx);
3162 break;
3163 }
3164 case ERPCs.RPC_BUNKERBROADCAST_CONFIG_SYNC:
3165 {
3167 break;
3168 }
3169 case ERPCs.RPC_UNDERGROUND_SYNC:
3170 {
3172 break;
3173 }
3174 case ERPCs.RPC_PLAYERRESTRICTEDAREAS_SYNC:
3175 {
3177 break;
3178 }
3179 case ERPCs.RPC_SEND_NOTIFICATION:
3180 {
3181 NotificationType type;
3182 float show_time;
3183 string detail_text;
3184
3185 ctx.Read(type);
3186 ctx.Read(show_time);
3187 ctx.Read(detail_text);
3188
3189 NotificationSystem.AddNotification(type, show_time, detail_text);
3190 break;
3191 }
3192 case ERPCs.RPC_SEND_NOTIFICATION_EXTENDED:
3193 {
3194 float show_time_ext;
3195 string title_text_ext;
3196 string detail_text_ext;
3197 string icon_ext;
3198
3199 ctx.Read(show_time_ext);
3200 ctx.Read(title_text_ext);
3201 ctx.Read(detail_text_ext);
3202 ctx.Read(icon_ext);
3203
3204 NotificationSystem.AddNotificationExtended(show_time_ext, title_text_ext, detail_text_ext, icon_ext);
3205 break;
3206 }
3207
3208
3209 case ERPCs.RPC_SOUND_HELICRASH:
3210 {
3211 bool playSound;
3212 vector pos;
3213 string sound_set;
3214
3215 //Helicrash is a world event, we want anyone to be able to hear it
3216 Param3<bool, vector, int> playCrashSound = new Param3<bool, vector, int>(false, "0 0 0",0);
3217 if (ctx.Read(playCrashSound))
3218 {
3219 playSound = playCrashSound.param1;
3220 pos = playCrashSound.param2;
3221 sound_set = CrashSoundSets.GetSoundSetByHash(playCrashSound.param3);
3222 }
3223
3224 if (playSound)
3225 {
3226 m_CrashSound = SEffectManager.PlaySound(sound_set, pos, 0.1, 0.1);
3227 m_CrashSound.SetAutodestroy(true);
3228 }
3229
3230 break;
3231 }
3232 //Random off map artillery barrage
3233 case ERPCs.RPC_SOUND_ARTILLERY:
3234 {
3236 Param1<vector> playArtySound = new Param1<vector>(vector.Zero);
3237 if (ctx.Read(playArtySound))
3238 {
3239 position = playArtySound.param1;
3240 if (position == vector.Zero)
3241 break;
3242 }
3243 else
3244 break;
3245
3246 if (!g_Game.GetPlayer())
3247 break;
3248
3249 if (vector.DistanceSq(g_Game.GetPlayer().GetPosition(), position) <= (MIN_ARTY_SOUND_RANGE * MIN_ARTY_SOUND_RANGE))
3250 break;
3251
3252 m_ArtySound = SEffectManager.PlaySound("Artillery_Distant_Barrage_SoundSet", position, 0.1, 0.1);
3253 m_ArtySound.SetAutodestroy(true);
3254
3255 break;
3256 }
3257 case ERPCs.RPC_SOUND_CONTAMINATION:
3258 {
3259 vector soundPos;
3260
3261 Param1<vector> playContaminatedSound = new Param1<vector>(vector.Zero);
3262 if (ctx.Read(playContaminatedSound))
3263 {
3264 soundPos = playContaminatedSound.param1;
3265 if (soundPos == vector.Zero)
3266 break;
3267 }
3268 else
3269 break;
3270
3271 if (!g_Game.GetPlayer())
3272 break;
3273
3274 EffectSound closeArtySound = SEffectManager.PlaySound("Artillery_Close_SoundSet", soundPos);
3275 closeArtySound.SetAutodestroy(true);
3276
3277 // We add camera shake upon shell detonation
3278 float distance_to_player = vector.DistanceSq(soundPos, g_Game.GetPlayer().GetPosition());
3279 if (distance_to_player <= GameConstants.CAMERA_SHAKE_ARTILLERY_DISTANCE2)
3280 {
3281 float strength_factor = Math.InverseLerp(GameConstants.CAMERA_SHAKE_ARTILLERY_DISTANCE, 0, Math.Sqrt(distance_to_player));
3282 DayZPlayerCamera camera = g_Game.GetPlayer().GetCurrentCamera();
3283 if (camera)
3284 camera.SpawnCameraShake(strength_factor * 4);
3285 }
3286
3287 ParticleManager.GetInstance().PlayInWorld(ParticleList.CONTAMINATED_AREA_GAS_SHELL, soundPos);
3288 break;
3289 }
3290 // Single artillery shot to announce dynamic contaminated area
3291 case ERPCs.RPC_SOUND_ARTILLERY_SINGLE:
3292 {
3293 vector soundPosition;
3294 vector delayedSoundPos;
3295 float soundDelay;
3296
3297 Param3<vector, vector, float> playArtyShotSound = new Param3<vector, vector, float>(vector.Zero, vector.Zero, 0);
3298 if (ctx.Read(playArtyShotSound))
3299 {
3300 soundPosition = playArtyShotSound.param1;
3301 delayedSoundPos = playArtyShotSound.param2;
3302 soundDelay = playArtyShotSound.param3;
3303 if (soundPosition == vector.Zero)
3304 break;
3305 }
3306 else
3307 break;
3308
3309 if (!g_Game.GetPlayer())
3310 break;
3311
3312 m_ArtySound = SEffectManager.PlaySound("Artillery_Distant_SoundSet", soundPosition, 0.1, 0.1);
3313 m_ArtySound.SetAutodestroy(true);
3314
3315 // We remove the amount of time the incoming sound lasts
3316 soundDelay -= 5;
3317 // We convert to milliseconds
3318 soundDelay *= 1000;
3319 GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(DelayedMidAirDetonation, soundDelay, false, delayedSoundPos[0], delayedSoundPos[1], delayedSoundPos[2]);
3320 break;
3321 }
3322 case ERPCs.RPC_SET_BILLBOARDS:
3323 {
3326
3327 Param1<int> indexP = new Param1<int>(-1);
3328 if (ctx.Read(indexP))
3329 {
3330 int index = indexP.param1;
3331 m_BillboardSetHandler.OnRPCIndex(index);
3332 }
3333 break;
3334 }
3335 #endif
3336 #endif
3337
3338 case ERPCs.RPC_USER_SYNC_PERMISSIONS:
3339 {
3340 map<string, bool> mute_list;
3341 if (ctx.Read(mute_list))
3342 {
3343 for (int i = 0; i < mute_list.Count(); i++)
3344 {
3345 string uid = mute_list.GetKey(i);
3346 bool mute = mute_list.GetElement(i);
3347 MutePlayer(uid, sender.GetPlainId(), mute);
3348 }
3349 }
3350 break;
3351 }
3352
3353 /*
3354 case ERPCs.RPC_SERVER_RESPAWN_MODE:
3355 {
3356 int mode;
3357 if (ctx.Read(mode) && !IsServer())
3358 {
3359 GetMission().SetRespawnModeClient(mode);
3360 }
3361 }
3362 */
3363
3364 #ifdef DEVELOPER
3365 Weather weather;
3366 case ERPCs.DEV_SET_WEATHER:
3367 {
3368 Param1<DebugWeatherRPCData> p1data = new Param1<DebugWeatherRPCData>(null);
3369
3370 if ( ctx.Read(p1data) )
3371 {
3372 DebugWeatherRPCData data = p1data.param1;
3373 weather = g_Game.GetWeather();
3374
3375 if (data.m_FogValue >= 0)
3376 weather.GetFog().Set(data.m_FogValue, data.m_FogInterpolation, data.m_FogDuration);
3377
3378 if (data.m_OvercastValue >= 0)
3380
3381 if (data.m_RainValue >= 0)
3382 weather.GetRain().Set(data.m_RainValue, data.m_RainInterpolation, data.m_RainDuration);
3383
3384 if (data.m_SnowfallValue >= 0)
3386
3387 if (data.m_VolFogDistanceDensity >= 0)
3389
3390 if (data.m_VolFogHeightDensity >= 0)
3392
3393 if (data.m_VolFogHeightBias >= -500)
3395
3396 if (data.m_WindMagnitudeValue >= 0)
3398
3399 if (data.m_WindDirectionValue >= -3.14)
3401 }
3402 else
3403 {
3404 ErrorEx("Failed to read weather debug data");
3405 }
3406 break;
3407 }
3408 case ERPCs.DEV_SET_SANDSTORM:
3409 {
3410 Param1<DebugSandstormRPCData> p1SandstormData = new Param1<DebugSandstormRPCData>(null);
3411
3412 if (ctx.Read(p1SandstormData))
3413 {
3414 DebugSandstormRPCData sandstormData = p1SandstormData.param1;
3415 weather = g_Game.GetWeather();
3416
3417 // Determine the wind dir so it can align with the predefined sandstorm direction
3418 vector stormDir = weather.GetSandstorm().GetDirection();
3419 float stormAngle = weather.WindDirectionToAngle(stormDir);
3420
3421 // Set accompanying properties like wind and overcast to desired values
3422 weather.GetWindDirection().Set(stormAngle, sandstormData.m_FadeInTime, sandstormData.m_Duration);
3423
3424 if (sandstormData.m_OvercastValue < 0.8)
3425 sandstormData.m_OvercastValue = 0.8;
3426
3427 weather.GetOvercast().Set(sandstormData.m_OvercastValue, sandstormData.m_FadeInTime, sandstormData.m_Duration);
3428
3429 if (sandstormData.m_WindMagnitudeValue < 18.0)
3430 sandstormData.m_WindMagnitudeValue = 18.0;
3431
3432 weather.GetWindMagnitude().Set(sandstormData.m_WindMagnitudeValue, sandstormData.m_FadeInTime, sandstormData.m_Duration);
3433 weather.GetRain().Set(0, sandstormData.m_FadeInTime, sandstormData.m_Duration);
3434
3435 if (sandstormData.m_StartStorm)
3436 weather.GetSandstorm().Start(sandstormData.m_FadeInTime, false);
3437 }
3438 }
3439 case ERPCs.DEV_STOP_SANDSTORM:
3440 {
3441 weather = g_Game.GetWeather();
3442 if (!weather.GetSandstorm().IsActive())
3443 return;
3444
3445 weather.GetSandstorm().Stop(0, false);
3446 }
3447 case ERPCs.DEV_SET_SANDSTORM_WEATHER:
3448 {
3449 weather = g_Game.GetWeather();
3450 if (weather.GetSandstorm().IsActive())
3451 return;
3452
3453 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).RemoveByName(this, "ForceOvercastReset");
3454 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(ForceOvercastReset, 0.05, true);
3455 }
3456 case ERPCs.DEV_STOP_SANDSTORM_WEATHER:
3457 {
3458 weather = g_Game.GetWeather();
3459 if (!weather.GetSandstorm().IsActive())
3460 return;
3461
3462 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).RemoveByName(this, "ForceOvercastReset");
3463 weather.GetSandstorm().Stop(0, false);
3464 }
3465 #endif
3466
3467
3468 #ifdef DIAG_DEVELOPER
3469 #ifdef SERVER
3470 case ERPCs.DIAG_CAMERATOOLS_CAM_DATA:
3471 {
3472 if (!m_CameraToolsMenuServer)
3473 {
3474 m_CameraToolsMenuServer = new CameraToolsMenuServer;
3475 }
3476 m_CameraToolsMenuServer.OnRPC(rpc_type, ctx);
3477 break;
3478 }
3479
3480 case ERPCs.DIAG_CAMERATOOLS_CAM_SUBSCRIBE:
3481 {
3482 if (!m_CameraToolsMenuServer)
3483 {
3484 m_CameraToolsMenuServer = new CameraToolsMenuServer;
3485 }
3486 m_CameraToolsMenuServer.OnRPC(rpc_type, ctx);
3487 break;
3488 }
3489 case ERPCs.DIAG_GEYSER_VALUES:
3490 {
3491 auto geyserParams = new Param3<bool, float, float>(false, 0, 0);
3492 if (ctx.Read(geyserParams))
3493 {
3494 if (!m_GeyserDiagData)
3495 m_GeyserDiagData = new GeyserDebugData();
3496
3497 m_GeyserDiagData.SetData(geyserParams.param1, geyserParams.param2, geyserParams.param3);
3498 }
3499 break;
3500 }
3501 #endif
3502 #endif
3503
3504 }
3505 // global rpc's handling
3506 }
3507 }
3508
3509 void DelayedMidAirDetonation(float x, float y, float z)
3510 {
3511 EffectSound artilleryFallSound = SEffectManager.PlaySound("Artillery_Fall_SoundSet", Vector(x, y, z));
3512 artilleryFallSound.SetAutodestroy(true);
3513 }
3514
3515 // ------------------------------------------------------------
3517 {
3518 #ifndef NO_GUI
3520 if (mission && !m_loading.IsLoading() && GetUIManager().IsDialogQueued())
3521 {
3522 mission.Pause();
3524 }
3525 #endif
3526 }
3527
3529 void SetConnecting(bool value)
3530 {
3531 m_IsConnecting = value;
3532 }
3533
3535 {
3536 return m_IsConnecting;
3537 }
3538
3539 // ------------------------------------------------------------
3541 {
3542 return m_loading && m_loading.IsLoading();
3543 }
3544
3545 // ------------------------------------------------------------
3547 {
3548 m_keyboard_handler = handler;
3549 }
3550
3551 // ------------------------------------------------------------
3553 {
3554 #ifndef NO_GUI
3555 m_loading.ShowEx(this);
3556 #endif
3557 }
3558
3559 // ------------------------------------------------------------
3560 void LoadingHide(bool force = false)
3561 {
3562 #ifndef NO_GUI
3563 m_loading.Hide(force);
3564 // turn the lights back on
3565 PPEManagerStatic.GetPPEManager().StopAllEffects();
3566 #ifdef PLATFORM_CONSOLE
3567 if (!IsLoading())
3568 {
3569 if (m_LoadState != DayZLoadState.MAIN_MENU_START && m_LoadState != DayZLoadState.MAIN_MENU_USER_SELECT)
3570 {
3572 }
3573 }
3574 #endif
3575 #endif
3576 }
3577
3578 // ------------------------------------------------------------
3579 override string CreateDefaultPlayer()
3580 {
3581 if (m_CharClassNames.Count() > 0)
3582 return m_CharClassNames[0];
3583
3584 return "";
3585 }
3586
3587 // ------------------------------------------------------------
3588 override string CreateRandomPlayer()
3589 {
3590 return m_CharClassNames.GetRandomElement();
3591 }
3592
3593 // ------------------------------------------------------------
3595 {
3596 return m_CharClassNames;
3597 }
3598
3599 // ------------------------------------------------------------
3600 void ExplosionEffectsEx(Object source, Object directHit, int componentIndex, float energyFactor, float explosionFactor, HitInfo hitInfo)
3601 {
3602 vector pos = hitInfo.GetPosition();
3603 string ammoType = hitInfo.GetAmmoType();
3604
3605 // Call legacy method
3606 ExplosionEffects(source, directHit, componentIndex, hitInfo.GetSurface(), pos, hitInfo.GetSurfaceNormal(), energyFactor, explosionFactor, hitInfo.IsWater(), ammoType);
3607
3608 // add explosion noise
3609 if (IsServer())
3610 {
3611 //NoiseParams npar = new NoiseParams();
3612 m_NoiseParams.LoadFromPath(string.Format("cfgAmmo %1 NoiseExplosion", ammoType));
3613
3614 float multiplier = hitInfo.GetSurfaceNoiseMultiplier();
3615 if (multiplier == 0)
3616 multiplier = 1;
3617
3618 GetNoiseSystem().AddNoiseTarget(pos, 21, m_NoiseParams, multiplier);
3619 }
3620 }
3621
3622 // ------------------------------------------------------------
3623 void ExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal,
3624 float energyFactor, float explosionFactor, bool isWater, string ammoType)
3625 {
3626 #ifndef SERVER
3627 #ifndef NO_GUI
3628 if (source)
3629 {
3630 if (g_Game.GetPlayer() == null)
3631 return;
3632 source.OnExplosionEffects(source, directHit, componentIndex, surface, pos, surfNormal, energyFactor, explosionFactor, isWater, ammoType);
3633
3634 ExplosiveEffectData explosiveEffectData = AmmoTypesAPI.GetExplosiveEffectData(ammoType, surface);
3635 if (explosiveEffectData.m_ParticleID > 0)
3636 {
3637 ParticleSource particleSource = ParticleManager.GetInstance().PlayInWorld(explosiveEffectData.m_ParticleID, pos);
3638 particleSource.SetStartSoundParams(explosiveEffectData.m_SoundSetName, pos);
3639 }
3640
3641 float distance_to_player = vector.Distance(pos, g_Game.GetPlayer().GetPosition());
3643
3644 if (distance_to_player < m_AmmoShakeParams.m_Radius)
3645 {
3646 float dist01 = Math.InverseLerp(0, m_AmmoShakeParams.m_Radius, distance_to_player);
3647 float modifier = Math.Lerp(m_AmmoShakeParams.m_ModifierClose, m_AmmoShakeParams.m_ModifierFar,dist01);
3648
3649 g_Game.GetPlayer().GetCurrentCamera().SpawnCameraShake(modifier * m_AmmoShakeParams.m_Strength);
3650 }
3651 }
3652 #endif
3653 #endif
3654 }
3655
3656 // ------------------------------------------------------------
3658 {
3659 string simulation;
3660
3661 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " simulation", simulation);
3662
3663 if (simulation == "shotArrow")
3664 {
3665 string pile;
3666
3667 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " spawnPileType", pile);
3668
3669 EntityAI arrow = EntityAI.Cast(g_Game.CreateObjectEx(pile, info.GetPos(), ECE_DYNAMIC_PERSISTENCY));
3670 arrow.PlaceOnSurface();
3671 arrow.SetFromProjectile(info);
3672 }
3673 }
3674
3675 const float ARROW_PIERCE_DEPTH = 0.05;
3676
3677 // ------------------------------------------------------------
3678 void OnProjectileStoppedInTerrain(TerrainCollisionInfo info)
3679 {
3680 string simulation;
3681
3682 if (info.GetIsWater())
3683 return;
3684
3685 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " simulation", simulation);
3686 if (simulation == "shotArrow")
3687 {
3688 string pile;
3689 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " spawnPileType", pile);
3690 vector pos = info.GetPos();
3691 vector dir = -info.GetInVelocity();
3692
3693 dir.Normalize();
3694 pos -= dir * ARROW_PIERCE_DEPTH;
3695
3696 EntityAI arrow = EntityAI.Cast(g_Game.CreateObjectEx(pile, pos, ECE_KEEPHEIGHT|ECE_DYNAMIC_PERSISTENCY));
3697 arrow.SetDirection(dir);
3698 arrow.SetFromProjectile(info);
3699 }
3700 }
3701
3702 // ------------------------------------------------------------
3704 {
3705 string simulation;
3706
3707 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " simulation", simulation);
3708 if (simulation == "shotArrow")
3709 {
3710 string pile;
3711 g_Game.ConfigGetText("cfgAmmo " + info.GetAmmoType() + " spawnPileType", pile);
3712
3713 EntityAI arrow = null;
3714 EntityAI ent = EntityAI.Cast(info.GetHitObj());
3715 if (ent)
3716 {
3717 EntityAI parent = ent.GetHierarchyParent();
3718 if (parent && parent.IsPlayer())
3719 {
3720 arrow = EntityAI.Cast(g_Game.CreateObjectEx(pile, parent.GetPosition(), ECE_DYNAMIC_PERSISTENCY));
3721 arrow.PlaceOnSurface();
3722 arrow.SetFromProjectile(info);
3723
3724 return;
3725 }
3726 }
3727
3728 vector pos = info.GetPos();
3729 vector dir = -info.GetInVelocity();
3730
3731 dir.Normalize();
3732 pos -= dir * ARROW_PIERCE_DEPTH;
3733
3734 arrow = EntityAI.Cast(g_Game.CreateObjectEx(pile, pos, ECE_KEEPHEIGHT|ECE_DYNAMIC_PERSISTENCY));
3735 arrow.SetDirection(dir);
3736 arrow.SetFromProjectile(info);
3737
3738 info.GetHitObj().AddArrow(arrow, info.GetComponentIndex(), info.GetHitObjPos(), info.GetHitObjRot());
3739 }
3740 }
3741
3742 // ------------------------------------------------------------
3743 void FirearmEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal,
3744 vector exitPos, vector inSpeed, vector outSpeed, bool isWater, bool deflected, string ammoType)
3745 {
3746 #ifndef SERVER
3747 ImpactEffectsData impactEffectsData = new ImpactEffectsData();
3748 impactEffectsData.m_DirectHit = directHit;
3749 impactEffectsData.m_ComponentIndex = componentIndex;
3750 impactEffectsData.m_Surface = surface;
3751 impactEffectsData.m_Position = pos;
3752 impactEffectsData.m_ImpactType = ImpactTypes.UNKNOWN;
3753 impactEffectsData.m_SurfaceNormal = surfNormal;
3754 impactEffectsData.m_ExitPosition = exitPos;
3755 impactEffectsData.m_InSpeed = inSpeed;
3756 impactEffectsData.m_OutSpeed = outSpeed;
3757 impactEffectsData.m_IsDeflected = deflected;
3758 impactEffectsData.m_AmmoType = ammoType;
3759 impactEffectsData.m_IsWater = isWater;
3760
3761 if (directHit)
3762 {
3763 directHit.OnReceivedHit(impactEffectsData);
3764 }
3765
3766 #ifndef NO_GUI
3767 ImpactMaterials.EvaluateImpactEffectEx(impactEffectsData);
3768 #endif
3769 #endif
3770
3771 if (IsServer())
3772 {
3773 if (source && source.ShootsExplosiveAmmo() && !deflected && outSpeed == vector.Zero)
3774 {
3775 if (ammoType == "Bullet_40mm_ChemGas")
3776 {
3777 g_Game.CreateObject("ContaminatedArea_Local", pos);
3778 }
3779 else if (ammoType == "Bullet_40mm_Explosive")
3780 {
3781 DamageSystem.ExplosionDamage(EntityAI.Cast(source), null, "Explosion_40mm_Ammo", pos, DamageType.EXPLOSION);
3782 }
3783 }
3784
3785 // add hit noise
3786 m_NoiseParams.LoadFromPath("cfgAmmo " + ammoType + " NoiseHit");
3787
3788 float surfaceCoef = SurfaceGetNoiseMultiplier(directHit, pos, componentIndex);
3789 float coefAdjusted = surfaceCoef * inSpeed.Length() / ConfigGetFloat("cfgAmmo " + ammoType + " initSpeed");
3790 if (coefAdjusted == 0)
3791 coefAdjusted = 1;
3792
3793 GetNoiseSystem().AddNoiseTarget(pos, 10, m_NoiseParams, coefAdjusted); // Leave a ping for 5 seconds
3794 }
3795 }
3796
3797 // ------------------------------------------------------------
3798 void CloseCombatEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal,
3799 bool isWater, string ammoType)
3800 {
3801 #ifndef SERVER
3802 ImpactEffectsData impactEffectsData = new ImpactEffectsData();
3803 impactEffectsData.m_DirectHit = directHit;
3804 impactEffectsData.m_ComponentIndex = componentIndex;
3805 impactEffectsData.m_Surface = surface;
3806 impactEffectsData.m_Position = pos;
3807 impactEffectsData.m_ImpactType = ImpactTypes.MELEE;
3808 impactEffectsData.m_SurfaceNormal = Vector(Math.RandomFloat(-1,1), Math.RandomFloat(-1,1), Math.RandomFloat(-1,1));
3809 impactEffectsData.m_ExitPosition = "0 0 0";
3810 impactEffectsData.m_InSpeed = "0 0 0";
3811 impactEffectsData.m_OutSpeed = "0 0 0";
3812 impactEffectsData.m_IsDeflected = false;
3813 impactEffectsData.m_AmmoType = ammoType;
3814 impactEffectsData.m_IsWater = isWater;
3815
3816 if (directHit)
3817 directHit.OnReceivedHit(impactEffectsData);
3818
3819 #ifndef NO_GUI
3820 ImpactMaterials.EvaluateImpactEffectEx(impactEffectsData);
3821 #endif
3822 #endif
3823
3824 // add hit noise
3825 if (IsServer())
3826 {
3827 m_NoiseParams.LoadFromPath("cfgAmmo " + ammoType + " NoiseHit");
3828
3829 float surfaceCoef = SurfaceGetNoiseMultiplier(directHit, pos, componentIndex);
3830 if (surfaceCoef == 0)
3831 surfaceCoef = 1;
3832
3833 GetNoiseSystem().AddNoisePos(EntityAI.Cast(source), pos, m_NoiseParams, surfaceCoef);
3834 }
3835 }
3836
3837 void UpdateVoiceLevel(int level)
3838 {
3840 }
3841
3842 void InitCharacterMenuDataInfo(int menudata_count)
3843 {
3844 m_OriginalCharactersCount = menudata_count;
3845 }
3846
3848 {
3850 }
3851
3853 {
3854 return m_PlayerName;
3855 }
3856
3857 void SetNewCharacter(bool state)
3858 {
3859 m_IsNewCharacter = state;
3860 }
3861
3863 {
3864 return m_IsNewCharacter;
3865 }
3866
3867 void SetUserFOV(float pFov)
3868 {
3869 if (pFov < OPTIONS_FIELD_OF_VIEW_MIN)
3870 pFov = OPTIONS_FIELD_OF_VIEW_MIN;
3871
3872 if (pFov > OPTIONS_FIELD_OF_VIEW_MAX)
3873 pFov = OPTIONS_FIELD_OF_VIEW_MAX;
3874
3875 m_UserFOV = pFov;
3876 }
3877
3879 {
3880 return m_UserFOV;
3881 }
3882
3884 {
3885 GameOptions gameOptions = new GameOptions;
3886 NumericOptionsAccess noa;
3887 if (gameOptions && Class.CastTo(noa,gameOptions.GetOptionByType(OptionAccessType.AT_OPTIONS_FIELD_OF_VIEW)))
3888 {
3889 return noa.ReadValue();
3890 }
3891 return 1.0;
3892 }
3893
3895 {
3896 switch (type)
3897 {
3898 case ECameraZoomType.NONE:
3899 return GetUserFOV();
3900 case ECameraZoomType.NORMAL:
3902 case ECameraZoomType.SHALLOW:
3904 default:
3905 return GetUserFOV();
3906 }
3907 return GetUserFOV();
3908 }
3909
3910 void SetHudBrightness(float value)
3911 {
3912 Widget.SetLV(value);
3913 Widget.SetTextLV(value);
3914 }
3915
3917 {
3918 return g_Game.GetProfileOptionFloat(EDayZProfilesOptions.HUD_BRIGHTNESS);
3919 }
3920
3921 // Check if ammo is compatible with a weapon in hands
3922 static bool CheckAmmoCompability(EntityAI weaponInHand, EntityAI ammo)
3923 {
3924 TStringArray ammo_names = new TStringArray; // Array of ammo types (their name) that can be used with weapon in hand
3925
3926 string cfg_path = "CfgWeapons " + weaponInHand.GetType() + " chamberableFrom"; // Create config path
3927 g_Game.ConfigGetTextArray(cfg_path, ammo_names); // Get ammo types
3928
3929 foreach (string ammo_name : ammo_names) // for every ammo in ammo string compare passed ammo
3930 {
3931 if (ammo.GetType() == ammo_name)
3932 {
3933 return true;
3934 }
3935 }
3936
3937 // if no ammo from the array matches with ammo passed, return false
3938 return false;
3939 }
3940
3941 void SetEVValue(float value)
3942 {
3944 SetEVUser(value);
3945 m_EVValue = value;
3946 }
3947
3949 {
3950 return m_EVValue;
3951 }
3952
3954 {
3955 return m_PreviousEVValue;
3956 }
3957
3959 {
3960 ListOptionsAccess language_option;
3961 GameOptions options = new GameOptions();
3962 language_option = ListOptionsAccess.Cast(options.GetOptionByType(OptionAccessType.AT_OPTIONS_LANGUAGE));
3963 int idx = -1;
3964 if (language_option)
3965 {
3966 idx = language_option.GetIndex();
3967 }
3968
3969 return idx;
3970 }
3971
3976
3978 {
3979 return (GetFoodDecayModifier() != 0);
3980 }
3981
3983 {
3984 #ifdef DIAG_DEVELOPER
3985
3986 if (FeatureTimeAccel.GetFeatureTimeAccelEnabled(ETimeAccelCategories.FOOD_DECAY))
3987 {
3988 return m_FoodDecayModifier * FeatureTimeAccel.GetFeatureTimeAccelValue();
3989 }
3990 #endif
3991 return m_FoodDecayModifier;
3992 }
3993
4002
4004 {
4006
4008 }
4009
4014
4017 {
4019#ifdef PLATFORM_CONSOLE
4020 if (GetInput())
4021 {
4022 return GetInput().IsMouseConnected();
4023 }
4024#endif
4025
4027#ifdef PLATFORM_CONSOLE
4028 return false;
4029#else
4030 return true;
4031#endif
4032 }
4033
4035 {
4036#ifndef NO_GUI
4037#ifdef FEATURE_CURSOR
4038 if (!IsAppActive())
4039 {
4040 ShowCursorWidget(true);
4041 }
4042 else
4043#endif
4044 {
4046
4047 UIManager ui = GetUIManager();
4048 if (ui)
4049 {
4051 ui.ShowCursor(showCursor);
4052 }
4053 else
4054 {
4056 ShowCursorWidget(showCursor);
4057 }
4058 }
4059#endif
4060 }
4061
4066
4068 //DEPRECATED//
4072};
4073
4074DayZGame g_Game;
4075
4076DayZGame GetDayZGame()
4077{
4078 return g_Game;
4079}
void AmmoTypesAPI()
Определения AmmoTypes.c:17
proto native CEApi GetCEApi()
Get the CE API.
const int ECE_KEEPHEIGHT
Определения CentralEconomy.c:28
const int ECE_DYNAMIC_PERSISTENCY
Определения CentralEconomy.c:33
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
EConnectErrorScript
Определения ConnectErrorScriptModule.c:2
DamageType
exposed from C++ (do not change)
Определения DamageSystem.c:11
class DayZProfilesOptions PARTY_CONTROLLER_SELECT
class DayZProfilesOptions MISSION_USER_SELECT
ImageWidget m_ImageLogoCorner
Определения DayZGame.c:715
void Hide()
Определения DayZGame.c:179
ImageWidget m_ImageLoadingIcon
Определения DayZGame.c:716
ImageWidget m_ImageWidgetBackground
Определения DayZGame.c:710
void Inc()
Определения DayZGame.c:780
enum DisconnectSessionFlags DISCONNECT_SESSION_FLAGS_FORCE
void LoginQueueBase()
Определения DayZGame.c:117
class DayZProfilesOptions PARTY_USER_SELECT
void EndLoading()
Определения DayZGame.c:802
bool IsLoading()
Определения DayZGame.c:810
class DayZProfilesOptions JOIN_START
class DayZProfilesOptions MAIN_MENU_USER_SELECT
Param3< string, int, int > DayZProfilesOptionInt
Определения DayZGame.c:417
class DayZProfilesOptions CONNECT_START
void SetProgress(float val)
Определения DayZGame.c:825
TextWidget m_TextWidgetTitle
Определения DayZGame.c:707
float m_LastProgressUpdate
Определения DayZGame.c:712
class DayZProfilesOptions MISSION_START
const int DISCONNECT_SESSION_FLAGS_ALL
Определения DayZGame.c:15
class DayZProfilesOptions PARTY
class DayZProfilesOptions MAIN_MENU_CONTROLLER_SELECT
void ~LoginQueueBase()
Определения DayZGame.c:122
ref UiHintPanelLoading m_HintPanel
Определения DayZGame.c:724
DayZGame g_Game
Определения DayZGame.c:4074
DisconnectSessionFlags
Определения DayZGame.c:2
@ DISCONNECT_ERROR_ENABLED
Определения DayZGame.c:6
@ JOIN_ERROR_CHECK
Определения DayZGame.c:5
@ IGNORE_WHEN_IN_GAME
Определения DayZGame.c:9
@ JOIN_ERROR_ENABLED
Определения DayZGame.c:4
@ ALWAYS_FORCE
Определения DayZGame.c:10
@ SELECT_USER
Определения DayZGame.c:7
@ CLOSE_MENUS
Определения DayZGame.c:8
class DayZProfilesOptions UNDEFINED
TextWidget m_ModdedWarning
Определения DayZGame.c:709
void ShowEx(DayZGame game)
Определения DayZGame.c:837
Param3< string, float, float > DayZProfilesOptionFloat
Определения DayZGame.c:418
ProgressBarWidget m_ProgressLoading
Определения DayZGame.c:718
class DayZProfilesOptions JOIN_USER_SELECT
const int DISCONNECT_SESSION_FLAGS_JOIN
Определения DayZGame.c:14
override Widget Init()
Определения DayZGame.c:127
ImageWidget m_ImageLogoMid
Определения DayZGame.c:714
DayZProfilesOption DayZProfilesOptionBool
Определения DayZGame.c:416
class DayZProfilesOptions JOIN_CONTROLLER_SELECT
void SetTitle(string title)
Определения DayZGame.c:815
class DayZProfilesOptions CONNECTING
class DayZProfilesOptions CONNECT_USER_SELECT
class DayZProfilesOptions MAIN_MENU_START
DayZGame GetDayZGame()
Определения DayZGame.c:4076
void LoadingScreen(DayZGame game)
Определения DayZGame.c:725
TextWidget m_TextWidgetStatus
Определения DayZGame.c:708
ButtonWidget m_btnLeave
Определения DayZGame.c:114
void Dec()
Определения DayZGame.c:790
void SetStatus(string status)
Определения DayZGame.c:820
class DayZProfilesOptions PARTY_START
float m_ImageLoadingIconRotation
Определения DayZGame.c:719
ImageWidget m_ImageBackground
Определения DayZGame.c:717
bool CanChangeHintPage(float timeAccu)
Определения DayZGame.c:195
class LoginScreenBase extends UIScriptedMenu m_txtPosition
DayZGame m_DayZGame
Определения DayZGame.c:711
int m_iPosition
Определения DayZGame.c:115
class DayZProfilesOptions m_WidgetRoot
void Show()
Определения DayZGame.c:171
TextWidget m_txtNote
Определения DayZGame.c:113
class DayZProfilesOptions CONNECT
TextWidget m_ProgressText
Определения DayZGame.c:720
ref Timer m_Timer
Определения DayZGame.c:723
class DayZProfilesOptions JOIN
class CrashSoundSets GetIsWater
Param3< string, bool, bool > DayZProfilesOption
Определения DayZGame.c:415
void SetPosition(int position)
Определения DayZGame.c:186
override bool OnClick(Widget w, int x, int y, int button)
buttons clicks
Определения DayZGame.c:160
ProjectileStoppedInfo Managed GetSurfNormal()
class DayZProfilesOptions MAIN_MENU
int m_Counter
Определения DayZGame.c:722
class DayZProfilesOptions CONNECT_CONTROLLER_SELECT
void SetDispatcher(Dispatcher dispatcher)
Определения Dispatcher.c:31
Mission mission
Определения DisplayStatus.c:28
string ammoType
Определения DustKickupEffects.c:24
vector position
Определения DustKickupEffects.c:20
ECameraZoomType
Определения ECameraZoomType.c:2
EDayZProfilesOptions
Определения EDayZProfilesOptions.c:2
DiagMenuIDs
Определения EDiagMenuIDs.c:2
EConnectivityStatType
Определения EGameStateIcons.c:2
ERPCs
Определения ERPCs.c:2
int GetID()
Get the ID registered in SEffectManager.
Определения Effect.c:561
const int MIN
Определения EnConvert.c:28
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
Определения ErrorModuleHandler.c:5
proto GizmoApi GetGizmoApi()
GizmoTransformMode
Определения GizmoApi.c:2
GizmoSpaceMode
Определения GizmoApi.c:11
Icon x
Icon y
ImpactTypes
Определения ImpactEffects.c:2
void Close()
class NoiseSystem NoiseParams()
Определения Noise.c:18
NotificationType
DEPRECATED (moved into NotificationSystem)
Определения NotificationSystem.c:4
string path
Определения OptionSelectorMultistate.c:142
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
proto native UAInputAPI GetUApi()
Определения AmmoCamParams.c:2
static void PlayerDisconnected(StatsEventDisconnectedData data)
Определения ScriptAnalytics.c:160
static void PlayerSpawned(StatsEventSpawnedData data)
Определения ScriptAnalytics.c:172
Определения ScriptAnalytics.c:146
static void LogRPT(string message)
Определения AutoTestFixture.c:50
Определения AutoTestFixture.c:2
static bool LoadData(string path)
Определения AutotestConfigHandler.c:5
Backlit effect class.
Определения Backlit.c:105
proto native owned string GetName()
proto native bool IsOnline()
Определения BiosUserManager.c:9
proto native EBiosError GetUserDatabaseIdAsync()
Call async function to get database ID.
proto native BiosUser GetSelectedUser()
Returns the currently selected user.
proto native EBiosError ParseJoinAsync(string join_data)
Parse the join data from from command line parameters.
proto native EBiosError PickUserAsync()
Display a system dependant account picket.
proto native EBiosError ParsePartyAsync(string party_data)
Parse the party data from from command line parameters.
proto native BiosUser GetTitleInitiator()
Gets the initiatior of the title.
proto native EBiosError LogOnUserAsync(BiosUser user)
Display a system dependant ui for log-on.
bool SelectUserEx(BiosUser user)
Определения BiosUserManager.c:90
static void Cleanup()
Определения BleedChanceData.c:64
static void InitBleedChanceData()
Определения BleedChanceData.c:10
Static data of bleeding chance probabilities; currently used for melee only.
Определения BleedChanceData.c:5
ref LoginQueueBase m_LoginQueue
Определения DayZGame.c:932
proto native UIManager GetUIManager()
bool IsConnecting()
Определения DayZGame.c:3534
void SetConnecting(bool value)
Returns true when connecting to server.
Определения DayZGame.c:3529
void SetProfileOptionInt(EDayZProfilesOptions option, int value)
Определения DayZGame.c:1336
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
string GetMissionPath()
Определения DayZGame.c:1223
void SetConnectivityStatState(EConnectivityStatType type, EConnectivityStatLevel level)
Определения DayZGame.c:1787
void DisconnectSessionScript(bool displayJoinError=false)
Определения DayZGame.c:2733
override TStringArray ListAvailableCharacters()
Определения DayZGame.c:3594
ref array< int > m_ConnectedInputDeviceList
Определения DayZGame.c:996
EConnectivityStatLevel m_ConnectivityStatsStates[STATS_COUNT]
Определения DayZGame.c:919
int GetMissionState()
Определения DayZGame.c:1274
void CancelLoginQueue()
Определения DayZGame.c:1437
override void OnUpdate(bool doSim, float timeslice)
Определения DayZGame.c:3000
bool m_ShouldShowControllerDisconnect
Определения DayZGame.c:965
ref TimerQueue m_timerQueue[CALL_CATEGORY_COUNT]
Определения DayZGame.c:936
int m_MissionState
Определения DayZGame.c:921
int m_PrevBlur
Определения DayZGame.c:2166
proto native NoiseSystem GetNoiseSystem()
ref array< string > m_CharClassNames
Определения DayZGame.c:995
ref EffectSound m_ArtySound
Определения DayZGame.c:1002
void UpdateVoiceLevel(int level)
Определения DayZGame.c:3837
override void OnActivateMessage()
Определения DayZGame.c:2097
string m_MissionPath
Определения DayZGame.c:946
void SetProfileOption(EDayZProfilesOptions option, bool value)
Определения DayZGame.c:1326
void AddVisitedServer(string ip, int port)
Определения DayZGame.c:2665
override void OnDeactivateMessage()
Определения DayZGame.c:2103
void UpdateLoginQueue(float timeslice)
Определения DayZGame.c:1875
void CreateTitleScreen()
Определения DayZGame.c:2197
override string CreateRandomPlayer()
Определения DayZGame.c:3588
float GetUserFOV()
Определения DayZGame.c:3878
void OnProjectileStoppedInTerrain(TerrainCollisionInfo info)
Определения DayZGame.c:3678
DayZGameState m_GameState
Определения DayZGame.c:924
void SetPreviousGamepad(int gamepad)
Определения DayZGame.c:2469
proto native float ConfigGetFloat(string path)
Get float value from config on path.
float GetFoodDecayModifier()
Определения DayZGame.c:3982
ref DayZProfilesOptions m_DayZProfileOptions
Определения DayZGame.c:942
bool IsLoading()
Определения DayZGame.c:3540
override UIScriptedMenu CreateScriptedMenu(int id)
create custom main menu part (submenu)
Определения DayZGame.c:1415
void ResetProfileOptions()
Определения DayZGame.c:1199
float GetProfileOptionDefaultFloat(EDayZProfilesOptions option)
Определения DayZGame.c:1321
void ConnectFromServerBrowserEx(string ip, int port, int steamQueryPort, string password="")
Определения DayZGame.c:2813
proto native void PlayMission(string path)
Starts mission (equivalent for SQF playMission). You MUST use double slash \.
void StoreLoginDataPrepare()
Определения DayZGame.c:2006
DayZGameState GetGameState()
Определения DayZGame.c:1366
override bool IsInventoryOpen()
Определения DayZGame.c:1392
bool m_AutotestEnabled
Определения DayZGame.c:916
void DelayedMidAirDetonation(float x, float y, float z)
Определения DayZGame.c:3509
override void OnPostUpdate(bool doSim, float timeslice)
Определения DayZGame.c:3087
int m_ConnectPort
Определения DayZGame.c:2171
int GetCurrentDisplayLanguageIdx()
Определения DayZGame.c:3958
void LoadingShow()
Определения DayZGame.c:3552
proto native void SetPlayerName(string name)
Sets current player name.
float GetProfileOptionFloat(EDayZProfilesOptions option)
Определения DayZGame.c:1301
array< int > GetConnectedInputDeviceList()
Определения DayZGame.c:3994
float m_volume_music
Определения DayZGame.c:978
void TryConnect()
Определения DayZGame.c:2594
proto native World GetWorld()
void ConnectFromCLI()
Определения DayZGame.c:2827
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1233
void CGame()
Определения Global/game.c:34
void InitNotifications()
Определения DayZGame.c:2158
override void OnDeviceReset()
Определения DayZGame.c:2985
float m_volume_VOIP
Определения DayZGame.c:979
int GetProfileOptionDefaultInt(EDayZProfilesOptions option)
Определения DayZGame.c:1316
override void OnAfterCreate()
Определения DayZGame.c:2091
proto native bool IsMultiplayer()
void SetPlayerGameName(string name)
Определения DayZGame.c:3847
proto native void MutePlayer(string muteUID, string playerUID, bool mute)
Mutes voice of source player to target player.
void OnGameplayDataHandlerLoad()
Определения DayZGame.c:1267
int GetPreviousGamepad()
Определения DayZGame.c:2474
string GetPlayerGameName()
Определения DayZGame.c:3852
float m_volume_radio
Определения DayZGame.c:980
bool GetProfileOptionDefaultBool(EDayZProfilesOptions option)
Определения DayZGame.c:1311
bool IsKindOf(string cfg_class_name, string cfg_parent_name)
Returns is class name inherited from parent class name.
Определения Global/game.c:1436
void OnProjectileStopped(ProjectileStoppedInfo info)
Определения DayZGame.c:3657
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
override DragQueue GetDragQueue()
Определения DayZGame.c:1261
void ExplosionEffectsEx(Object source, Object directHit, int componentIndex, float energyFactor, float explosionFactor, HitInfo hitInfo)
Определения DayZGame.c:3600
bool GetProfileOptionDefault(EDayZProfilesOptions option)
Определения DayZGame.c:1306
bool OnConnectivityStatChange(EConnectivityStatType type, EConnectivityStatLevel newLevel, EConnectivityStatLevel oldLevel)
Определения DayZGame.c:1798
void SetMouseCursorDesiredVisibility(bool visible)
Определения DayZGame.c:4003
static bool ReportModded()
Определения DayZGame.c:1381
void LoadingHide(bool force=false)
Определения DayZGame.c:3560
bool GetMouseCursorDesiredVisibility()
Определения DayZGame.c:4010
static ref ScriptInvoker Event_OnRPC
Определения DayZGame.c:991
proto native void GetProfileStringList(string name, out TStringArray values)
Gets array of strings from profile variable.
proto native BiosUserManager GetUserManager()
string m_PlayerName
Определения DayZGame.c:961
void ForceOvercastReset()
Определения DayZGame.c:3129
void OnLoginTimeEvent(int loginTime)
Определения DayZGame.c:1909
ref ScriptInvoker m_postUpdateQueue[CALL_CATEGORY_COUNT]
Определения DayZGame.c:939
override void OnEvent(EventType eventTypeId, Param params)
Определения DayZGame.c:1479
void ConnectLaunch()
Определения DayZGame.c:2281
void GlobalsInit()
Определения DayZGame.c:1158
override void OnKeyPress(int key)
Определения DayZGame.c:2848
const int STATS_COUNT
Определения DayZGame.c:918
override ScriptInvoker GetUpdateQueue(int call_category)
Определения DayZGame.c:1238
bool m_early_access_dialog_accepted
Определения DayZGame.c:943
bool m_ConnectFromJoin
Определения DayZGame.c:964
bool m_IsStressTest
Определения DayZGame.c:958
void OnMPConnectionLostEvent(int duration)
Определения DayZGame.c:2028
string m_ConnectAddress
Определения DayZGame.c:2170
ref EffectSound m_CrashSound
Определения DayZGame.c:999
void RegisterProfilesOptions()
Определения DayZGame.c:1178
void CreateGamepadDisconnectMenu()
bool CanDisplayMouseCursor()
extend as needed, only game focus and M&K setting (consoles only!) are checked natively
Определения DayZGame.c:4016
void SetKeyboardHandle(UIScriptedMenu handler)
Определения DayZGame.c:3546
void OnRespawnEvent(int time)
Определения DayZGame.c:1964
float GetPreviousEVValue()
Определения DayZGame.c:3953
void LoginTimeCountdown()
Определения DayZGame.c:1947
proto native bool GetModToBeReported()
proto native void SetMainMenuWorld(string world)
bool IsStressTest()
Определения DayZGame.c:1351
proto native void RequestExit(int code)
Sets exit code and quits in the right moment.
bool m_IsConnecting
Определения DayZGame.c:963
void AutoTestLaunch(string param)
Определения DayZGame.c:2364
float m_FoodDecayModifier
Определения DayZGame.c:955
static bool m_ReportModded
Определения DayZGame.c:957
map< EDayZProfilesOptions, ref DayZProfilesOption > GetProfileOptionMap()
Определения DayZGame.c:1346
ref BillboardSetHandler m_BillboardSetHandler
Определения DayZGame.c:910
static ref NoiseParams m_NoiseParams
Определения DayZGame.c:1005
string m_DatabaseID
Определения DayZGame.c:2168
ref ScriptCallQueue m_callQueue[CALL_CATEGORY_COUNT]
Определения DayZGame.c:937
proto native AbstractSoundScene GetSoundScene()
bool m_IsNewCharacter
Определения DayZGame.c:962
Backlit GetBacklit()
Определения DayZGame.c:1386
ref ScriptInvoker m_YieldDataInitInvoker
Определения DayZGame.c:941
void EarlyAccessDialog(UIScriptedMenu parent)
Определения DayZGame.c:1404
void OnPreloadEvent(vector pos)
Определения DayZGame.c:1994
bool m_IsWorldWetTempUpdateEnabled
Определения DayZGame.c:953
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native bool IsServer()
bool m_FirstConnect
Определения DayZGame.c:927
void MainMenuLaunch()
Определения DayZGame.c:2316
void DeleteTitleScreen()
Определения DayZGame.c:2237
int m_OriginalCharactersCount
Определения DayZGame.c:960
void SetLoadState(DayZLoadState state)
Определения DayZGame.c:1371
string GetMissionFolderPath()
Определения DayZGame.c:1228
void EnterLoginTime(UIMenuPanel parent)
Определения DayZGame.c:2022
void Connect()
Определения DayZGame.c:2711
ref Widget m_IntroMenu
Определения DayZGame.c:2164
ref Backlit m_Backlit
Определения DayZGame.c:993
bool m_IsRightAltHolding
Определения DayZGame.c:951
void RemoveVoiceNotification(VONStopSpeakingEventParams vonStopParams)
Определения DayZGame.c:1869
const int MISSION_STATE_GAME
Определения DayZGame.c:913
ref TStringArray m_Visited
Определения DayZGame.c:2176
ref ScriptInvoker m_updateQueue[CALL_CATEGORY_COUNT]
Определения DayZGame.c:938
float GetCurrentEVValue()
Определения DayZGame.c:3948
static float GetUserFOVFromConfig()
Определения DayZGame.c:3883
override string CreateDefaultPlayer()
Определения DayZGame.c:3579
void ~DayZGame()
Определения DayZGame.c:1125
void EnterLoginQueue(UIMenuPanel parent)
Определения DayZGame.c:2016
bool m_IsCtrlHolding
Определения DayZGame.c:948
void SetNewCharacter(bool state)
Определения DayZGame.c:3857
void RefreshCurrentServerInfo()
Определения DayZGame.c:2699
override void OnKeyRelease(int key)
Определения DayZGame.c:2930
void DayZGame()
Определения DayZGame.c:1016
void ClearConnectivityStates()
Определения DayZGame.c:1471
float m_DeltaTime
Определения DayZGame.c:970
static bool CheckAmmoCompability(EntityAI weaponInHand, EntityAI ammo)
Определения DayZGame.c:3922
ScriptInvoker GetYieldDataInitInvoker()
Определения DayZGame.c:1248
bool ShouldShowControllerDisconnect()
Определения DayZGame.c:2245
const int MAX_VISITED
Определения DayZGame.c:2175
bool GetProfileOptionBool(EDayZProfilesOptions option)
Определения DayZGame.c:1291
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)
Определения DayZGame.c:3743
float GetFOVByZoomType(ECameraZoomType type)
Определения DayZGame.c:3894
void OnProjectileStoppedInObject(ObjectCollisionInfo info)
Определения DayZGame.c:3703
proto native owned string GetMainMenuWorld()
void ConnectFromServerBrowser(string ip, int port, string password="")
Определения DayZGame.c:2804
void JoinLaunch()
Определения DayZGame.c:2266
override void OnMouseButtonRelease(int button)
Определения DayZGame.c:2975
void CheckDialogs()
Определения DayZGame.c:3516
DayZLoadState GetLoadState()
Определения DayZGame.c:1376
proto native DayZPlayer GetPlayer()
void SetMissionPath(string path)
Called from C++.
Определения DayZGame.c:1207
bool GetLastVisitedServer(out string ip, out int port)
Определения DayZGame.c:2648
proto native WorkspaceWidget GetWorkspace()
bool IsLeftCtrlDown()
Определения DayZGame.c:2842
ref ConnectionLost m_connectionLost
Определения DayZGame.c:935
bool m_IsWinHolding
Определения DayZGame.c:949
bool IsAimLogEnabled()
Определения DayZGame.c:1356
override void OnMouseButtonPress(int button)
Определения DayZGame.c:2965
void MissionLaunch()
Определения DayZGame.c:2335
void PartyLaunch()
Определения DayZGame.c:2302
proto native void SaveProfile()
Saves profile on disk.
void SetDatabaseID(string id)
Определения DayZGame.c:2183
void InitCharacterMenuDataInfo(int menudata_count)
Определения DayZGame.c:3842
bool IsVisited(string ip, int port)
Определения DayZGame.c:2692
proto native Weather GetWeather()
Returns weather controller object.
void SelectUser(int gamepad=-1)
Определения DayZGame.c:2382
void CancelLoginTimeCountdown()
Определения DayZGame.c:1453
UIScriptedMenu m_keyboard_handler
Определения DayZGame.c:944
ref NotificationUI m_Notifications
Определения DayZGame.c:926
proto native bool IsAppActive()
Returns if the application is focused on PC, returns true always on console.
void SelectGamepad()
Определения DayZGame.c:2529
ScriptModule m_mission_module
Определения DayZGame.c:945
void RefreshMouseCursorVisibility()
Определения DayZGame.c:4034
bool GetProfileOption(EDayZProfilesOptions option)
Определения DayZGame.c:1286
DayZLoadState m_LoadState
Определения DayZGame.c:925
string m_MissionFolderPath
Определения DayZGame.c:947
proto native bool IsClient()
bool m_IsFoodDecayEnabled
Определения DayZGame.c:954
int m_LoginTime
Определения DayZGame.c:933
float m_volume_sound
Определения DayZGame.c:976
int m_ConnectSteamQueryPort
Определения DayZGame.c:2172
bool IsFoodDecayEnabled()
Определения DayZGame.c:3977
float GetHUDBrightnessSetting()
Определения DayZGame.c:3916
ref LoginTimeBase m_LoginTimeScreen
Определения DayZGame.c:931
const int MISSION_STATE_MAINMENU
Определения DayZGame.c:912
string GetDatabaseID()
Определения DayZGame.c:2178
proto native void SetProfileStringList(string name, TStringArray values)
Sets array of strings to profile variable.
native void CreateMission(string path)
Create only enforce script mission, used for mission script reloading.
proto native void DisconnectSessionForce()
Forces disconnect from current multiplayer session even if not yet in the game.
static ref TemperatureAccessManager m_TAManager
Определения DayZGame.c:1006
override bool OnInitialize()
Определения DayZGame.c:2109
float m_volume_speechEX
Определения DayZGame.c:977
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
float m_EVValue
Определения DayZGame.c:983
void SetUserFOV(float pFov)
Определения DayZGame.c:3867
float m_UserFOV
Определения DayZGame.c:968
ref DragQueue m_dragQueue
Определения DayZGame.c:940
const int MIN_ARTY_SOUND_RANGE
Определения DayZGame.c:1003
int GetProfileOptionInt(EDayZProfilesOptions option)
Определения DayZGame.c:1296
void SetEVValue(float value)
Определения DayZGame.c:3941
const float ARROW_PIERCE_DEPTH
Определения DayZGame.c:3675
void SetProfileOptionBool(EDayZProfilesOptions option, bool value)
Определения DayZGame.c:1331
static ref AmmoCamParams m_AmmoShakeParams
Определения DayZGame.c:989
override ScriptInvoker GetPostUpdateQueue(int call_category)
Определения DayZGame.c:1243
void SetProfileOptionFloat(EDayZProfilesOptions option, float value)
Определения DayZGame.c:1341
override TimerQueue GetTimerQueue(int call_category)
Определения DayZGame.c:1256
override void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
Определения DayZGame.c:3141
void ReloadMission()
Определения DayZGame.c:1428
proto bool CommandlineGetParam(string name, out string value)
Get command line parameter value.
void GamepadCheck()
Определения DayZGame.c:2479
void CloseCombatEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, bool isWater, string ammoType)
Определения DayZGame.c:3798
proto native void SetEVUser(float value)
Sets custom camera camera EV. range: -50.0..50.0? //TODO.
void SetHudBrightness(float value)
Определения DayZGame.c:3910
void DeferredInit()
Определения DayZGame.c:1136
bool m_CursorDesiredVisibilityScript
Определения DayZGame.c:966
void DeleteGamepadDisconnectMenu()
bool m_IsLeftAltHolding
Определения DayZGame.c:950
proto native void AbortMission()
Returns to main menu, leave world empty for using last mission world.
const int MISSION_STATE_FINNISH
Определения DayZGame.c:914
proto native Input GetInput()
proto native void StartRandomCutscene(string world)
Starts intro.
BillboardSetHandler GetBillboardHandler()
Определения DayZGame.c:4062
proto native Mission GetMission()
bool m_AimLoggingEnabled
Определения DayZGame.c:959
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
Определения Global/game.c:1592
void ExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
Определения DayZGame.c:3623
void UpdateInputDeviceDisconnectWarning()
Определения DayZGame.c:2250
void ConnectFromJoin(string ip, int port)
Определения DayZGame.c:2819
float m_PreviousEVValue
Определения DayZGame.c:982
void SetGameState(DayZGameState state)
Определения DayZGame.c:1361
ref Widget m_GamepadDisconnectMenu
Определения DayZGame.c:2165
void DisconnectSessionEx(DisconnectSessionFlags flags)
Определения DayZGame.c:2745
string m_ConnectPassword
Определения DayZGame.c:2173
int m_PreviousGamepad
Определения DayZGame.c:967
float GetDeltaT()
Определения DayZGame.c:2994
bool IsNewCharacter()
Определения DayZGame.c:3862
void AddVoiceNotification(VONStopSpeakingEventParams vonStartParams)
Определения DayZGame.c:1864
void LoadProgressUpdate(int progressState, float progress, string title)
Определения DayZGame.c:2049
void SetMissionState(int state)
Определения DayZGame.c:1280
ref LoadingScreen m_loading
Определения DayZGame.c:930
proto native void StoreLoginData(ParamsWriteContext ctx)
Stores login userdata as parameters which are sent to server.
bool IsWorldWetTempUpdateEnabled()
Определения DayZGame.c:3972
static void Init()
Определения UtilityClasses.c:42
static void Init()
Определения UtilityClasses.c:23
static void OnRPC(ParamsReadContext ctx)
Определения CfgBunkerBroadcastHandler.c:65
static void OnRPC(Man player, ParamsReadContext ctx)
Определения CfgGameplayHandler.c:102
static void OnRPC(ParamsReadContext ctx)
Super root of all classes in Enforce script.
Определения EnScript.c:11
static void ResetClientData()
Определения ClientData.c:13
Определения ClientData.c:2
static void Init()
Определения Component.c:37
Определения Component.c:16
TextWidget m_TextWidgetTitle
Определения DayZGame.c:365
void SetDuration(float duration)
Определения DayZGame.c:409
float GetDuration()
Определения DayZGame.c:404
void ConnectionLost(DayZGame game)
Определения DayZGame.c:368
void Hide()
Определения DayZGame.c:391
ref Widget m_WidgetRoot
Определения DayZGame.c:364
void SetText(string text)
Определения DayZGame.c:399
float m_duration
Определения DayZGame.c:366
void Show()
Определения DayZGame.c:377
Определения DayZGame.c:363
static void RegisterSoundSet(string sound_set)
Определения DayZGame.c:48
static ref map< int, string > m_Mappings
Определения DayZGame.c:46
static string GetSoundSetByHash(int hash)
Определения DayZGame.c:53
Определения DayZGame.c:45
override void StopDeathDarkeningEffect()
Определения DayZPlayerImplement.c:835
DayZGame m_Game
Определения DayZGame.c:670
bool GetProfileOptionBool(EDayZProfilesOptions option)
Определения DayZGame.c:591
ref map< EDayZProfilesOptions, ref DayZProfilesOptionBool > m_DayZProfilesOptionsBool
Определения DayZGame.c:422
void RegisterProfileOptionFloat(EDayZProfilesOptions option, string profileOptionName, float defaultValue=0.0)
Определения DayZGame.c:468
ref map< EDayZProfilesOptions, ref DayZProfilesOption > m_DayZProfilesOptions
Определения DayZGame.c:669
void DayZProfilesOptions()
Определения DayZGame.c:430
static ref ScriptInvoker m_OnBoolOptionChanged
Определения DayZGame.c:427
bool GetProfileOptionDefaultBool(EDayZProfilesOptions option)
Определения DayZGame.c:623
void ResetOptionsFloat()
Определения DayZGame.c:517
float GetProfileOptionFloat(EDayZProfilesOptions option)
Определения DayZGame.c:607
void SetProfileOption(EDayZProfilesOptions option, bool value)
Определения DayZGame.c:533
void SetProfileOptionBool(EDayZProfilesOptions option, bool value)
Определения DayZGame.c:547
void ResetOptions()
Определения DayZGame.c:496
void ResetOptionsBool()
Определения DayZGame.c:482
static ref ScriptInvoker m_OnIntOptionChanged
Определения DayZGame.c:426
map< EDayZProfilesOptions, ref DayZProfilesOptionBool > GetProfileOptionMap()
Определения DayZGame.c:659
void SetProfileOptionFloat(EDayZProfilesOptions option, float value)
Определения DayZGame.c:566
void RegisterProfileOptionBool(EDayZProfilesOptions option, string profileOptionName, bool defaultValue=true)
Определения DayZGame.c:449
int GetProfileOptionInt(EDayZProfilesOptions option)
Определения DayZGame.c:596
void ResetOptionsInt()
Определения DayZGame.c:501
int GetProfileOptionDefaultInt(EDayZProfilesOptions option)
Определения DayZGame.c:635
bool GetProfileOption(EDayZProfilesOptions option)
Определения DayZGame.c:580
float GetProfileOptionDefaultFloat(EDayZProfilesOptions option)
Определения DayZGame.c:647
void RegisterProfileOptionInt(EDayZProfilesOptions option, string profileOptionName, int defaultValue=0)
Определения DayZGame.c:454
ref map< EDayZProfilesOptions, ref DayZProfilesOptionInt > m_DayZProfilesOptionsInt
Определения DayZGame.c:423
bool GetProfileOptionDefault(EDayZProfilesOptions option)
Определения DayZGame.c:618
void SetProfileOptionInt(EDayZProfilesOptions option, int value)
Определения DayZGame.c:552
void RegisterProfileOption(EDayZProfilesOptions option, string profileOptionName, bool def=true)
Определения DayZGame.c:437
static ref ScriptInvoker m_OnFloatOptionChanged
Определения DayZGame.c:428
ref map< EDayZProfilesOptions, ref DayZProfilesOptionFloat > m_DayZProfilesOptionsFloat
Определения DayZGame.c:424
Определения DayZGame.c:421
Определения DbgUI.c:60
static void Init()
Определения 3_Game/DayZ/tools/Debug.c:81
Определения 3_Game/DayZ/tools/Debug.c:2
float m_FogValue
Определения DebugWeatherRPCData.c:3
float m_RainDuration
Определения DebugWeatherRPCData.c:15
float m_OvercastInterpolation
Определения DebugWeatherRPCData.c:9
float m_SnowfallInterpolation
Определения DebugWeatherRPCData.c:11
float m_WindDirectionValue
Определения DebugWeatherRPCData.c:35
float m_SnowfallDuration
Определения DebugWeatherRPCData.c:16
float m_VolFogDistanceDensity
Определения DebugWeatherRPCData.c:18
float m_VolFogHeightBiasTime
Определения DebugWeatherRPCData.c:25
float m_VolFogDistanceDensityTime
Определения DebugWeatherRPCData.c:19
float m_VolFogHeightDensityTime
Определения DebugWeatherRPCData.c:22
float m_WindDInterpolation
Определения DebugWeatherRPCData.c:36
float m_VolFogHeightDensity
Определения DebugWeatherRPCData.c:21
float m_SnowfallValue
Определения DebugWeatherRPCData.c:6
float m_WindDDuration
Определения DebugWeatherRPCData.c:37
float m_OvercastValue
Определения DebugWeatherRPCData.c:4
float m_FogInterpolation
Определения DebugWeatherRPCData.c:8
float m_FogDuration
Определения DebugWeatherRPCData.c:13
float m_RainValue
Определения DebugWeatherRPCData.c:5
float m_RainInterpolation
Определения DebugWeatherRPCData.c:10
float m_VolFogHeightBias
Определения DebugWeatherRPCData.c:24
float m_OvercastDuration
Определения DebugWeatherRPCData.c:14
float m_WindMagnitudeValue
Определения DebugWeatherRPCData.c:31
Определения EnDebug.c:241
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Определения EffectSound.c:607
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
static proto native ErrorModuleHandler GetInstance()
Gets the EMH Instance.
void OnEvent(EventType eventTypeId, Param params)
is called by DayZGame to pass Events.
Определения ErrorModuleHandler.c:255
static proto int ThrowError(ErrorCategory category, int code, string additionalInfo="")
Creates and throws the error code, sending it to the handler of the category.
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerMod...
Определения ErrorModuleHandler.c:29
string m_SoundSetName
Определения AmmoTypes.c:4
int m_ParticleID
Определения AmmoTypes.c:3
Определения AmmoTypes.c:2
struct that keeps Time relevant information for future formatting
Определения TimeConversions.c:5
proto native void Initialize()
Initializes option values with the current users settings.
proto native OptionsAccess GetOptionByType(int accessType)
Get option by AccessType.
Определения gameplay.c:1461
proto GizmoSpaceMode GetSpaceMode()
proto GizmoTransformMode GetTransformMode()
proto void SetTransformMode(GizmoTransformMode mode)
proto void SetSpaceMode(GizmoSpaceMode mode)
Определения GizmoApi.c:27
proto native vector GetPosition()
proto native string GetAmmoType()
proto native bool IsWater()
proto native string GetSurface()
proto native vector GetSurfaceNormal()
proto native float GetSurfaceNoiseMultiplier()
Определения HitInfo.c:2
void Update(float timeslice)
Определения gameplay.c:660
void SetConnectivityStatIcon(EConnectivityStatType type, EConnectivityStatLevel level)
Определения gameplay.c:638
static void EvaluateImpactEffectEx(ImpactEffectsData pData)
Определения ImpactEffects.c:141
Определения ImpactEffects.c:29
proto void GetGamepadUser(int gamepad, out BiosUser user)
proto native void ResetActiveGamepad()
clears active gamepad
proto native void SelectActiveGamepad(int gamepad)
void UpdateConnectedInputDeviceList()
currently lists only available Gamepad, Mouse, and Keyboard. Extendable as needed.
Определения input.c:235
bool AreAllAllowedInputDevicesActive(out array< int > unavailableDeviceList=null)
returns true if 'Gamepad' or if 'Mouse/Keyboard' control is allowed locally and on server,...
Определения input.c:173
int GetUserGamepad(BiosUser user)
Определения input.c:338
proto native void IdentifyGamepad(GamepadButton button)
the on OnGamepadIdentification callback will return the first gamepad where the button was pressed
proto native bool IsMouseConnected()
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Определения InputUtils.c:167
static const float ICON_SCALE_TOOLBAR
Определения InputUtils.c:15
Определения InputUtils.c:2
void LoginQueueStatic()
Определения DayZGame.c:205
LoginQueue position when using -connect since mission is not created yet.
Определения DayZGame.c:204
void LoginTimeBase()
Определения DayZGame.c:223
void SetStatus(string status)
Определения DayZGame.c:324
override bool OnClick(Widget w, int x, int y, int button)
Определения DayZGame.c:271
bool IsRespawn()
Определения DayZGame.c:334
TextWidget m_txtLabel
Определения DayZGame.c:216
void ~LoginTimeBase()
Определения DayZGame.c:231
void Hide()
Определения DayZGame.c:291
void SetTime(int time)
Определения DayZGame.c:298
TextWidget m_txtDescription
Определения DayZGame.c:215
void Show()
Определения DayZGame.c:282
bool CanChangeHintPage(float timeAccu)
Определения DayZGame.c:339
override Widget Init()
Определения DayZGame.c:238
ref FullTimeData m_FullTime
Определения DayZGame.c:221
void SetRespawn(bool value)
Определения DayZGame.c:329
ButtonWidget m_btnLeave
Определения DayZGame.c:217
bool m_IsRespawn
Определения DayZGame.c:219
Определения DayZGame.c:214
void ~LoginTimeStatic()
Определения DayZGame.c:355
void LoginTimeStatic()
Определения DayZGame.c:348
LoginTime when using -connect since mission is not created yet.
Определения DayZGame.c:347
TODO doc.
Определения EnScript.c:118
Определения EnMath.c:7
void SerializeCharacterData(ParamsWriteContext ctx)
serializes data into a param array to be used by "StoreLoginData(notnull array<ref Param> params);"
Определения gameplay.c:1071
void UpdateVoiceLevelWidgets(int level)
Определения gameplay.c:812
Mission class.
Определения gameplay.c:686
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'.
proto void AddNoisePos(EntityAI source_entity, vector pos, NoiseParams noise_params, float external_strenght_multiplier=1.0)
static void AddNotificationExtended(float show_time, string title_text, string detail_text="", string icon="")
Send custom notification from to local player.
Определения NotificationSystem.c:215
static void InitInstance()
Определения NotificationSystem.c:90
static void CleanupInstance()
Определения NotificationSystem.c:99
const int DEFAULT_TIME_DISPLAYED
Определения NotificationSystem.c:71
static void AddNotification(NotificationType type, float show_time, string detail_text="")
Send notification from default types to local player.
Определения NotificationSystem.c:192
static void Update(float timeslice)
Определения NotificationSystem.c:233
Определения NotificationUI.c:2
proto native vector GetHitObjRot()
proto native Object GetHitObj()
proto native vector GetHitObjPos()
proto native int GetComponentIndex()
Определения DayZGame.c:32
Определения ObjectTyped.c:2
static void OnGameplayDataHandlerLoad()
Определения ObjectSpawner.c:71
static void LoadVoicePrivilege()
Определения OnlineServices.c:432
static void LeaveGameplaySession()
Определения OnlineServices.c:546
static void GetSession()
Определения OnlineServices.c:495
static BiosUser GetBiosUser()
Определения OnlineServices.c:504
static void GetCurrentServerInfo(string ip, int port)
Определения OnlineServices.c:139
static void SetBiosUser(BiosUser user)
Определения OnlineServices.c:509
static void EnterGameplaySession()
Определения OnlineServices.c:531
static void SetMultiplayState(bool state)
Определения OnlineServices.c:520
static void LoadMPPrivilege()
Определения OnlineServices.c:415
static void Init()
Определения OnlineServices.c:30
static void ClearCurrentServerInfo()
Определения OnlineServices.c:178
Определения OnlineServices.c:2
static void CreateManagerStatic()
Определения PPEManager.c:6
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Определения PPEManager.c:27
static void DestroyManagerStatic()
Определения PPEManager.c:17
Static component of PPE manager, used to hold the instance.
Определения PPEManager.c:3
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
static const int CONTAMINATED_AREA_GAS_SHELL
Определения ParticleList.c:320
static void PreloadParticles()
Preloads all particles.
Определения ParticleList.c:569
Определения ParticleList.c:12
Entity which has the particle instance as an ObjectComponent.
Определения ParticleSource.c:128
proto string GetPlainId()
plaintext unique id of player (cannot be used in database or logs)
proto float GetOutputThrottle()
Throttling performed on output bandwidth since last update (percentage [0,1])
proto int GetPingAvg()
ping range estimation
proto float GetInputThrottle()
Throttling performed on input bandwidth since last update(percentage [0,1]) (unknown value on Server)
proto int GetPingAct()
ping range estimation
The class that will be instanced (moddable)
Определения gameplay.c:389
static proto native void SetUserData(Widget inst)
static proto native void DestroyAllPendingProgresses()
static proto native void SetProgressData(Widget inst)
Определения ProgressAsync.c:2
proto native vector GetPos()
proto native string GetAmmoType()
proto native float GetProjectileDamage()
proto native Object GetSource()
proto native vector GetInVelocity()
Определения DayZGame.c:18
Определения gameplay.c:317
static void OnUpdate(float timeslice)
Определения EffectManager.c:654
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.
Определения EffectManager.c:178
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
proto native void Stop(float duration, bool calledByWeather)
Stops the sandstorm, leaving it to fade out over duration seconds. The sandstorm must be active prior...
proto native bool Start(float duration, bool calledByWeather)
proto native vector GetDirection()
Returns the direction from the start position to the end position of the sandstorm.
proto native bool IsActive()
Returns whether sandstorm is currently active.
proto void Remove(func fn)
remove specific call from queue
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 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 native void Tick(float timeslice)
executes calls on queue if their time is already elapsed, if 'repeat = false' call is removed from qu...
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
Определения 2_GameLib/DayZ/tools.c:53
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
ScriptInvoker Class provide list of callbacks usage:
Определения 2_GameLib/DayZ/tools.c:116
Module containing compiled scripts.
Определения EnScript.c:131
proto native ParamsWriteContext GetWriteContext()
proto bool Read(void value_in)
string m_CharacterId
character ID
Определения ScriptAnalytics.c:61
string m_Reason
reason of disconnect (quit, kick, ban, sign-out...)
Определения ScriptAnalytics.c:62
int m_Lifetime
lifetime of character in seconds
Определения ScriptAnalytics.c:69
int m_DaytimeHour
current time in hour (hour in 24h)
Определения ScriptAnalytics.c:72
int m_Population
population of current gameplay (server)
Определения ScriptAnalytics.c:71
vector m_Position
position of spawn
Определения ScriptAnalytics.c:70
string m_CharacterId
character ID
Определения ScriptAnalytics.c:68
Определения EnWidgets.c:220
Определения DayZPlayerImplement.c:39
proto native void PresetSelect(int index)
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
proto native void ScreenFadeOut(float duration)
proto native bool ShowCursor(bool visible)
natively checks game focus on cursor hiding
proto native int GetLoginQueuePosition()
proto native UIScriptedMenu EnterScriptedMenu(int id, UIMenuPanel parent)
Create & open menu with specific id (see MenuID) and set its parent.
proto native bool ShowQueuedDialog()
bool CloseAll()
Close all opened menus.
Определения UIManager.c:78
proto native UIScriptedMenu ShowScriptedMenu(UIScriptedMenu menu, UIMenuPanel parent)
Определения UIManager.c:2
Part of main menu hierarchy to create custom menus from script.
Определения UIScriptedMenu.c:3
override void Update(float timeslice)
Определения DayZGame.c:69
bool m_IsStatic
Определения DayZGame.c:66
override void Refresh()
Определения ChatInputMenu.c:70
bool CanChangeHintPage(float timeAccu)
override bool IsHandlingPlayerDeathEvent()
Определения DayZGame.c:104
bool IsStatic()
Определения DayZGame.c:99
float m_HintTimeAccu
Определения DayZGame.c:67
ref UiHintPanelLoading m_HintPanel
Определения DayZGame.c:65
void Leave()
Определения DayZGame.c:87
Определения DayZGame.c:64
static void OnRPC(ParamsReadContext ctx)
Определения UndergroundAreaLoader.c:181
static VONManagerBase GetInstance()
Main way to access VONManager functionality from script.
Определения VONManager.c:309
void OnEvent(EventType eventTypeId, Param params)
Manager class which handles Voice-over-network functionality while player is connected to a server.
Определения VONManager.c:302
proto native Fog GetFog()
Returns a fog phenomenon object.
proto native void SetDynVolFogHeightBias(float value, float time=0)
Sets the 'dynamic' volumetric height bias. Takes effect only if enabled via world config.
proto native WindMagnitude GetWindMagnitude()
Returns a wind magnitude phenomenon object.
proto native void SetDynVolFogDistanceDensity(float value, float time=0)
Sets the dynamic volumetric fog distance density. Only takes effect if dynamic volumetric fog is enab...
proto native Sandstorm GetSandstorm()
Returns the sandstorm phenomenon weather controller.
proto native Snowfall GetSnowfall()
Returns a snowfall phenomenon object.
static proto float WindDirectionToAngle(vector dir)
Returns the xz angle of the provided wind vector.
proto native WindDirection GetWindDirection()
Returns a wind direction phenomenon object.
proto native void SetDynVolFogHeightDensity(float value, float time=0)
Sets the dynamic volumetric fog height density. Only takes effect if dynamic volumetric fog is enable...
proto native Rain GetRain()
Returns a rain phenomenon object.
proto native Overcast GetOvercast()
Returns an overcast phenomenon object.
Определения Weather.c:168
proto native void Set(float forecast, float time=0, float minDuration=0)
Sets the forecast.
proto native void SetNextChange(float time)
Sets the time in seconds when the next forecast will be computed.
Определения EnWidgets.c:190
void UpdateWeatherEffects(Weather weather, float timeslice)
Updates local weather effects.
Определения WorldData.c:195
Keeps information about currently loaded world, like temperature.
Определения WorldData.c:3
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
string ToString()
Определения EnConvert.c:3
proto string ToString(bool simple=true)
Определения Transport.c:70
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)
static const vector Zero
Определения EnConvert.c:123
proto float Normalize()
Normalizes vector. Returns length.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
Определения EnConvert.c:119
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
Определения dayzplayer.c:56
const int PROGRESS_UPDATE
Определения gameplay.c:397
Param1< int > RespawnEventParams
RespawnTime.
Определения gameplay.c:431
Param1< int > MPConnectionLostEventParams
Duration.
Определения gameplay.c:457
Param1< int > LoginTimeEventParams
LoginTime.
Определения gameplay.c:429
const EventType MPSessionEndEventTypeID
no params
Определения gameplay.c:477
const EventType ConnectingStartEventTypeID
no params
Определения gameplay.c:567
PlayerIdentity PROGRESS_START
const EventType LoginStatusEventTypeID
params: LoginStatusEventParams
Определения gameplay.c:539
Param1< vector > PreloadEventParams
Position.
Определения gameplay.c:433
Serializer ParamsReadContext
Определения gameplay.c:15
Param4< float, float, int, int > ServerFpsStatsUpdatedEventParams
average server fps, highest frame time, skipped physics simulation steps server/client
Определения gameplay.c:439
const EventType WorldCleaupEventTypeID
no params
Определения gameplay.c:471
Param1< string > DLCOwnerShipFailedParams
world name
Определения gameplay.c:453
Param1< int > LogoutEventParams
logoutTime
Определения gameplay.c:443
Param2< string, string > VONStopSpeakingEventParams
player name, player id
Определения gameplay.c:451
const EventType SelectedUserChangedEventTypeID
no params
Определения gameplay.c:543
const EventType RespawnEventTypeID
params: RespawnEventParams
Определения gameplay.c:533
const EventType MPSessionFailEventTypeID
no params
Определения gameplay.c:479
const int PROGRESS_PROGRESS
Определения gameplay.c:396
const EventType StartupEventTypeID
no params
Определения gameplay.c:469
const EventType DialogQueuedEventTypeID
no params
Определения gameplay.c:495
Param4< int, string, string, string > ChatMessageEventParams
channel, from, text, color config class
Определения gameplay.c:407
Param2< string, string > LoginStatusEventParams
text message for line 1, text message for line 2
Определения gameplay.c:441
const EventType MPSessionStartEventTypeID
no params
Определения gameplay.c:475
const EventType PreloadEventTypeID
params: PreloadEventParams
Определения gameplay.c:535
const EventType LoginTimeEventTypeID
params: LoginTimeEventParams
Определения gameplay.c:531
Param1< PlayerIdentity > ConnectivityStatsUpdatedEventParams
PlayerIdentity.
Определения gameplay.c:437
const EventType ServerFpsStatsUpdatedEventTypeID
params: ServerFpsStatsUpdatedEventParams
Определения gameplay.c:527
const EventType ConnectivityStatsUpdatedEventTypeID
params: ConnectivityStatsUpdatedEventParams
Определения gameplay.c:525
const EventType MPConnectionLostEventTypeID
params: MPConnectionLostEventParams
Определения gameplay.c:483
const EventType LogoutEventTypeID
params: LogoutEventParams
Определения gameplay.c:537
const EventType MPSessionPlayerReadyEventTypeID
no params
Определения gameplay.c:481
const EventType DLCOwnerShipFailedEventTypeID
params: DLCOwnerShipFailedParams
Определения gameplay.c:563
Param3< int, float, string > ProgressEventParams
state, progress, title
Определения gameplay.c:404
const int PROGRESS_FINISH
Определения gameplay.c:395
const EventType ProgressEventTypeID
params: ProgressEventParams
Определения gameplay.c:489
OptionAccessType
C++ OptionAccessType.
Определения gameplay.c:1224
const EventType ChatMessageEventTypeID
params: ChatMessageEventParams
Определения gameplay.c:499
const EventType ConnectingAbortEventTypeID
no params
Определения gameplay.c:569
const string GAME_CHAT_MSG
Определения 3_Game/DayZ/constants.c:627
const string SYSTEM_CHAT_MSG
Определения 3_Game/DayZ/constants.c:622
const string RADIO_CHAT_MSG
Определения 3_Game/DayZ/constants.c:626
const string PLAYER_CHAT_MSG
Определения 3_Game/DayZ/constants.c:629
const string DIRECT_CHAT_MSG
Определения 3_Game/DayZ/constants.c:624
const string ADMIN_CHAT_MSG
Определения 3_Game/DayZ/constants.c:628
const int COLOR_RED
Определения 1_Core/DayZ/constants.c:64
const int COLOR_WHITE
Определения 1_Core/DayZ/constants.c:63
const int COLOR_YELLOW
Определения 1_Core/DayZ/constants.c:67
ErrorExSeverity
Определения EnDebug.c:62
proto void Print(void var)
Prints content of variable to console/log.
enum ShapeType ErrorEx
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void PlotLive(string label, int sizeX, int sizeY, float val, int timeStep=100, int historySize=30, int color=0xFFFFFFFF)
static proto native void Text(string label)
static proto native void ColoredText(int color, string label)
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.
const int CAMERA_SHAKE_ARTILLERY_DISTANCE
Определения 3_Game/DayZ/constants.c:1051
const string OPTIONS_SOUND_AMBIENT_SOUND_MODE
Определения 3_Game/DayZ/constants.c:648
const float DZPLAYER_CAMERA_FOV_EYEZOOM
FOV (vertical angle/2) in radians. Take care to modify also in "basicDefines.hpp".
Определения 3_Game/DayZ/constants.c:1039
const float DZPLAYER_CAMERA_FOV_EYEZOOM_SHALLOW
Определения 3_Game/DayZ/constants.c:1040
const float LOADING_SCREEN_HINT_INTERVAL
Определения 3_Game/DayZ/constants.c:1076
const int CAMERA_SHAKE_ARTILLERY_DISTANCE2
Определения 3_Game/DayZ/constants.c:1052
const float LOADING_SCREEN_HINT_INTERVAL_MIN
Определения 3_Game/DayZ/constants.c:1077
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
class array< Class T > TStringArray
GamepadButton
Определения EnSystem.c:341
const string SHOW_QUICKBAR
Определения 3_Game/DayZ/constants.c:637
const string SHOW_SERVERINFO
Определения 3_Game/DayZ/constants.c:645
const string SHOW_HUD_VEHICLE
Определения 3_Game/DayZ/constants.c:639
const string SHOW_HUD
Определения 3_Game/DayZ/constants.c:638
const string SHOW_CONNECTIVITYINFO
Определения 3_Game/DayZ/constants.c:642
const string HUD_BRIGHTNESS
Определения 3_Game/DayZ/constants.c:640
const string ENABLE_BLEEDINGINDICATION
Определения 3_Game/DayZ/constants.c:641
const string SHOW_CROSSHAIR
Определения 3_Game/DayZ/constants.c:644
KeyCode
Определения EnSystem.c:157
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 Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Sqrt(float val)
Returns square root.
static proto float Min(float x, float y)
Returns smaller of two given values.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
const int MENU_TITLE_SCREEN
Определения 3_Game/DayZ/constants.c:202
const int MENU_LOGIN_TIME
Определения 3_Game/DayZ/constants.c:213
const int MENU_MAIN
Определения 3_Game/DayZ/constants.c:188
const int MENU_SERVER_BROWSER
Определения 3_Game/DayZ/constants.c:206
const int MENU_LOGIN_QUEUE
Определения 3_Game/DayZ/constants.c:205
const int MENU_WARNING_INPUTDEVICE_DISCONNECT
Определения 3_Game/DayZ/constants.c:218
const int MENU_EARLYACCESS
Определения 3_Game/DayZ/constants.c:182
const int MENU_INVENTORY
Определения 3_Game/DayZ/constants.c:186
@ NONE
body is not in simulation, nor in collision world
Определения SimulationState.c:15
proto native float GetVOIPVolume()
proto native float GetMusicVolume()
proto native float GetSoundVolume()
proto native float GetRadioVolume()
proto native float GetSpeechExVolume()
proto native int Length()
Returns length of string.
proto native int ToInt()
Converts string to integer.
proto native float ToFloat()
Converts string to float.
proto native int Hash()
Returns hash of string.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
Определения EnString.c:396
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 bool GetCLIParam(string param, out string val)
Returns command line argument.
bool GetProfileValueBool(string name, bool def=false)
Return value from profile variable, if variable with given name is not present, default value is retu...
Определения 3_Game/DayZ/tools/tools.c:1019
const int CALL_CATEGORY_GAMEPLAY
Определения 3_Game/DayZ/tools/tools.c:10
proto native void OnUpdate()
Определения 3_Game/DayZ/tools/tools.c:349
const int CALL_CATEGORY_GUI
Определения 3_Game/DayZ/tools/tools.c:9
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/DayZ/tools/tools.c:8
void OnTimer()
DEPRECATED.
Определения 3_Game/DayZ/tools/tools.c:350
const int CALL_CATEGORY_COUNT
Определения 3_Game/DayZ/tools/tools.c:12
const int IDC_MAIN_QUIT
Определения 3_Game/DayZ/constants.c:150
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.
proto native void ShowCursorWidget(bool show)
direct mouse cursor visibility control
WorkspaceWidget Widget
Defined in code.
TypeID EventType
Определения EnWidgets.c:55
EInputDeviceType
Определения input.c:3