56 private float m_ExitButtonDisabledRemainingTime;
58 void MissionGameplay()
61 m_Initialized =
false;
67 m_Hud =
new IngameHud;
79 void ~MissionGameplay()
83 if (
g_Game.GetUIManager() &&
g_Game.GetUIManager().ScreenFadeVisible())
85 g_Game.GetUIManager().ScreenFadeOut(0);
93 return m_InventoryMenu;
106 #ifdef DIAG_DEVELOPER
107 if (!
g_Game.IsMultiplayer())
109 CfgGameplayHandler.LoadData();
110 UndergroundAreaLoader.SpawnAllTriggerCarriers();
116 MapMarkerTypes.Init();
118 m_UIManager =
g_Game.GetUIManager();
123 if ( !m_HudRootWidget )
125 m_HudRootWidget =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/day_z_hud.layout");
127 m_HudRootWidget.Show(
false);
129 m_Chat.Init(m_HudRootWidget.FindAnyWidget(
"ChatFrameWidget"));
131 m_ActionMenu.Init( m_HudRootWidget.FindAnyWidget(
"ActionsPanel"), TextWidget.Cast( m_HudRootWidget.FindAnyWidget(
"DefaultActionWidget") ) );
133 m_Hud.Init( m_HudRootWidget.FindAnyWidget(
"HudPanel") );
136 m_MicrophoneIcon = ImageWidget.Cast( m_HudRootWidget.FindAnyWidget(
"mic") );
137 m_MicrophoneIcon.Show(
false);
140 m_VoiceLevels = m_HudRootWidget.FindAnyWidget(
"VoiceLevelsPanel");
146 m_VoiceLevelsWidgets.Set(VoiceLevelWhisper, ImageWidget.Cast( m_VoiceLevels.FindAnyWidget(
"Whisper") ));
147 m_VoiceLevelsWidgets.Set(VoiceLevelTalk, ImageWidget.Cast( m_VoiceLevels.FindAnyWidget(
"Talk") ));
148 m_VoiceLevelsWidgets.Set(VoiceLevelShout, ImageWidget.Cast( m_VoiceLevels.FindAnyWidget(
"Shout") ));
150 m_VoiceLevelTimers.Set(VoiceLevelWhisper,
new WidgetFadeTimer);
151 m_VoiceLevelTimers.Set(VoiceLevelTalk,
new WidgetFadeTimer);
152 m_VoiceLevelTimers.Set(VoiceLevelShout,
new WidgetFadeTimer);
155 HideVoiceLevelWidgets();
158 m_ChatChannelArea = m_HudRootWidget.FindAnyWidget(
"ChatChannelPanel");
159 m_ChatChannelText = TextWidget.Cast( m_HudRootWidget.FindAnyWidget(
"ChatChannelText") );
166 if ( !m_HudDebug.IsInitialized() )
168 m_HudDebug.Init(
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/debug/day_z_hud_debug.layout") );
169 PluginConfigDebugProfile.GetInstance().SetLogsEnabled(LogManager.IsLogsEnable());
174 #ifndef DIAG_DEVELOPER
175 #ifdef BUILD_EXPERIMENTAL
176 m_Watermark =
new Watermark();
181 UIManager GetUIManager()
186 override void OnMissionStart()
188 g_Game.SetConnecting(
false);
190#ifndef FEATURE_CURSOR
192 GetUIManager().ShowUICursor(
false);
195 g_Game.SetMissionState(DayZGame.MISSION_STATE_GAME);
198 #ifdef DIAG_DEVELOPER
199 if (!
g_Game.IsMultiplayer())
202 EffectAreaLoader.CreateZones();
210 if ( !m_InventoryMenu )
216 void TickScheduler(
float timeslice)
218 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer() );
221 player.OnScheduledTick(timeslice);
223 if (
g_Game.m_AutotestEnabled)
225 if (!AutotestRunner.IsDone())
227 if (!AutotestRunner.IsRunning())
228 AutotestRunner.Start();
230 AutotestRunner.Update(timeslice);
239 void SendMuteListToServer( map<string, bool> mute_list )
241 if( mute_list && mute_list.Count() > 0 )
243 ScriptRPC rpc =
new ScriptRPC();
244 rpc.Write(mute_list);
245 rpc.Send(null,
ERPCs.RPC_USER_SYNC_PERMISSIONS,
true, null);
249 override void UpdateInputDevicesAvailability()
251 super.UpdateInputDevicesAvailability();
253 g_Game.GetInput().UpdateConnectedInputDeviceList();
254 g_Game.UpdateInputDeviceDisconnectWarning();
257 override void OnMissionFinish()
259 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer() );
262 GetUIManager().HideDialog();
266 delete m_HudRootWidget;
269 m_DebugMonitor.Hide();
270#ifndef FEATURE_CURSOR
271 g_Game.GetUIManager().ShowUICursor(
false);
275 g_Game.SetMissionState( DayZGame.MISSION_STATE_FINNISH );
278 override void OnUpdate(
float timeslice)
281 UpdateInputDeviceDiag();
285 if (GetTimeStamp() == 0)
289 m_PauseQueued =
true;
294 GetUIManager().ShowUICursor(
false);
299 if (m_PauseQueued && !IsPaused())
304 Man player =
g_Game.GetPlayer();
305 PlayerBase playerPB = PlayerBase.Cast(player);
306 TickScheduler(timeslice);
307 UpdateDummyScheduler();
308 UIScriptedMenu menu = m_UIManager.GetMenu();
310 NoteMenu note_menu = NoteMenu.Cast( m_UIManager.FindMenu(
MENU_NOTE) );
311 GesturesMenu gestures_menu = GesturesMenu.Cast(m_UIManager.FindMenu(
MENU_GESTURES));
312 RadialQuickbarMenu quickbar_menu = RadialQuickbarMenu.Cast(m_UIManager.FindMenu(
MENU_RADIAL_QUICKBAR));
313 InspectMenuNew inspect = InspectMenuNew.Cast( m_UIManager.FindMenu(
MENU_INSPECT) );
314 Input input =
g_Game.GetInput();
315 ActionBase runningAction;
316 bool manualInputUnlockProcessed =
false;
318 Hologram localPlacingHologram;
321 #ifdef DIAG_DEVELOPER
324 DbgUI.Begin(
"Hologram Debug", 5, 5);
328 localPlacingHologram = playerPB.GetHologramLocal();
329 if (localPlacingHologram)
333 #ifdef DIAG_DEVELOPER
334 else if (DiagMenu.GetBool(
DiagMenuIDs.MISC_HOLOGRAM))
336 DbgUI.Text(
"No active Hologram");
345 runningAction = playerPB.GetActionManager().GetRunningAction();
348#ifdef PLATFORM_CONSOLE
350 if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalValue() && !menu)
352 GetUApi().GetInputByID(UAUIQuickbarRadialOpen).Lock();
353 GetUApi().GetInputByID(UAZoomInToggle).Lock();
354 GetUApi().GetInputByID(UAPersonView).Lock();
355 GetUApi().GetInputByID(UALeanLeft).Lock();
356 GetUApi().GetInputByID(UALeanRight).Lock();
358 else if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalRelease())
360 GetUApi().GetInputByID(UAUIQuickbarRadialOpen).Unlock();
361 GetUApi().GetInputByID(UAZoomInToggle).Unlock();
362 GetUApi().GetInputByID(UAPersonView).Unlock();
363 if (playerPB && !playerPB.IsSprinting())
365 GetUApi().GetInputByID(UALeanLeft).Unlock();
366 GetUApi().GetInputByID(UALeanRight).Unlock();
369 manualInputUnlockProcessed =
true;
373 if (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalPress() && playerPB)
376 if ( playerPB.IsAlive() && !playerPB.IsRaised() && !playerPB.IsUnconscious() && !playerPB.GetCommand_Vehicle() )
380 RadialQuickbarMenu.OpenMenu();
387 if (GetUIManager().IsMenuOpen(
MENU_RADIAL_QUICKBAR ) && (!RadialQuickbarMenu.GetMenuInstance().GetParentMenu() || RadialQuickbarMenu.GetMenuInstance().GetParentMenu() != inventory) && (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalRelease() || !
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalValue()))
389 RadialQuickbarMenu.CloseMenu();
393 if ((RadialQuickbarMenu.instance && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() == inventory) &&
GetUApi().GetInputByID(UAUIQuickbarRadialInventoryOpen).LocalRelease())
398 RadialQuickbarMenu.CloseMenu();
399 RadialQuickbarMenu.SetItemToAssign(NULL);
403 AddActiveInputExcludes({
"inventory"});
404 AddActiveInputRestriction(EInputRestrictors.INVENTORY);
412 if (playerPB.IsRaised() || playerPB.IsInRasedProne())
414 GetUApi().GetInputByID(UALeanLeftGamepad).Unlock();
415 GetUApi().GetInputByID(UALeanRightGamepad).Unlock();
417 manualInputUnlockProcessed =
true;
421 GetUApi().GetInputByID(UALeanLeftGamepad).Lock();
422 GetUApi().GetInputByID(UALeanRightGamepad).Lock();
426 if (playerPB.IsRaised())
428 GetUApi().GetInputByID(UALookAround).Lock();
429 GetUApi().GetInputByID(UALookAroundToggle).Lock();
431 GetUApi().GetInputByID(UAZeroingUp).Unlock();
432 GetUApi().GetInputByID(UAZeroingDown).Unlock();
434 manualInputUnlockProcessed =
true;
438 GetUApi().GetInputByID(UALookAround).Unlock();
439 GetUApi().GetInputByID(UALookAroundToggle).Unlock();
441 GetUApi().GetInputByID(UAZeroingUp).Lock();
442 GetUApi().GetInputByID(UAZeroingDown).Lock();
444 manualInputUnlockProcessed =
true;
448 if (m_ExitButtonDisabledRemainingTime > 0)
450 m_ExitButtonDisabledRemainingTime -= timeslice;
454 if (manualInputUnlockProcessed)
460 if (
GetUApi().GetInputByID(UAUIGesturesOpen).LocalPress() && playerPB)
463 if ( !playerPB.IsRaised() && (playerPB.GetActionManager().ActionPossibilityCheck(playerPB.m_MovementState.m_CommandTypeId) || playerPB.IsEmotePlaying()) && !playerPB.GetCommand_Vehicle() )
465 if (GesturesMenu.CanOpenMenu() && !GetUIManager().IsMenuOpen(
MENU_GESTURES))
467 GesturesMenu.OpenMenu();
468 m_Hud.ShowHudUI(
false);
473 if (
GetUApi().GetInputByID(UAUIGesturesOpen).LocalRelease() ||
GetUApi().GetInputByID(UAUIGesturesOpen).LocalValue() == 0 )
478 GesturesMenu.CloseMenu();
479 m_Hud.ShowHudUI(
true );
483 if (player && m_LifeState ==
EPlayerStates.ALIVE && !player.IsUnconscious() )
488 m_HudRootWidget.Show(
true);
494 if ( GetUIManager().ScreenFadeVisible() )
496 GetUIManager().ScreenFadeOut(0.5);
501 if (
GetUApi().GetInputByID(UAGear).LocalPress())
503 if (!inventory && playerPB.CanManipulateInventory() && IsMapUnfoldActionRunning(runningAction))
506 menu = m_InventoryMenu;
508 else if (menu == inventory && m_InventoryMenu && m_InventoryMenu.IsOpened())
514 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress() && menu && inventory && menu == inventory)
519 #ifndef PLATFORM_CONSOLE
520 if (
GetUApi().GetInputByID(UAChat).LocalPress() && input.IsEnabledMouseAndKeyboardEvenOnServer())
522 ChatInputMenu chat = ChatInputMenu.Cast( m_UIManager.FindMenu(
MENU_CHAT) );
531 VONManager.GetInstance().HandleInput(input);
533 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalHold())
537 m_QuickbarHold =
true;
542 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalRelease())
548 m_QuickbarHold =
false;
551 if (
GetUApi().GetInputByID(UAZeroingUp).LocalPress() ||
GetUApi().GetInputByID(UAZeroingDown).LocalPress() ||
GetUApi().GetInputByID(UAToggleWeapons).LocalPress())
558 m_ActionMenu.Refresh();
560 if (
GetUApi().GetInputByID(UANextActionCategory).LocalPress())
562 m_ActionMenu.NextActionCategory();
564 else if (
GetUApi().GetInputByID(UAPrevActionCategory).LocalPress())
566 m_ActionMenu.PrevActionCategory();
568 else if (
GetUApi().GetInputByID(UANextAction).LocalPress())
570 m_ActionMenu.NextAction();
572 else if (
GetUApi().GetInputByID(UAPrevAction).LocalPress())
574 m_ActionMenu.PrevAction();
583 localPlacingHologram = playerPB.GetHologramLocal();
584 if (menu == null && playerPB.IsPlacingLocal() && localPlacingHologram && localPlacingHologram.
GetParentEntity() && localPlacingHologram.
GetParentEntity().PlacementCanBeRotated())
586 if (
GetUApi().GetInputByID(UANextAction).LocalRelease())
591 if (
GetUApi().GetInputByID(UAPrevAction).LocalRelease())
597 if (CfgGameplayHandler.GetMapIgnoreMapOwnership() && !CfgGameplayHandler.GetUse3DMap())
599 if (
GetUApi().GetInputByID(UAMapToggle).LocalPress() && !m_UIManager.GetMenu())
601 if (IsMapUnfoldActionRunning(runningAction))
603 HandleMapToggleByKeyboardShortcut(player);
612 int life_state = player.GetPlayerState();
613 m_LifeState = life_state;
616 if (menu && !menu.UseKeyboard() && menu.
UseMouse())
619 for (i = 0; i < 5; i++)
626 for (i = 0; i < 6; i++)
632 if (!m_UIManager.IsDialogVisible())
638 if (
GetUApi().GetInputByID(UAGear).LocalPress())
640 if (ItemManager.GetInstance().GetSelectedItem() == NULL)
645 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
647 if (ItemManager.GetInstance().GetSelectedItem() == NULL)
653 else if (menu == note_menu && (!IsInputExcludeActive(
"inventory") || !IsInputRestrictionActive(EInputRestrictors.INVENTORY)))
655 AddActiveInputExcludes({
"inventory"});
656 AddActiveInputRestriction(EInputRestrictors.INVENTORY);
658 else if (menu == gestures_menu && !gestures_menu.IsMenuClosing() && !IsInputExcludeActive(
"radialmenu"))
660 AddActiveInputExcludes({
"radialmenu"});
661 GetUApi().GetInputByID(UAUIGesturesOpen).Unlock();
663 else if (menu == quickbar_menu && !quickbar_menu.IsMenuClosing() && !IsInputExcludeActive(
"radialmenu"))
665 AddActiveInputExcludes({
"radialmenu"});
666 GetUApi().GetInputByID(UAUIQuickbarRadialOpen).Unlock();
670 InGameMenuXbox menu_xb = InGameMenuXbox.Cast(
g_Game.GetUIManager().GetMenu());
671 if (!
g_Game.GetUIManager().ScreenFadeVisible() && (!menu_xb || !menu_xb.IsOnlineOpen() && !menu_xb.FeedbackDialogVisible()))
673 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress())
677 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
682 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
684 if (menu_xb && menu_xb.IsOnlineOpen())
686 menu_xb.CloseOnline();
691 else if (
GetUApi().GetInputByID(UAUIMenu).LocalPress())
693 if (IsMapUnfoldActionRunning(runningAction))
700 UpdateDebugMonitor();
702 SEffectManager.Event_OnFrameUpdate(timeslice);
704 if (!
g_Game.IsMultiplayer())
710 if (m_ProcessInputExcludes)
712 PerformRefreshExcludes();
713 m_ProcessInputExcludes =
false;
716 super.OnUpdate( timeslice );
719 override void OnKeyPress(
int key)
721 super.OnKeyPress(key);
725 override void OnKeyRelease(
int key)
727 super.OnKeyRelease(key);
732 super.OnEvent(eventTypeId, params);
734 Man player =
g_Game.GetPlayer();
742 m_Chat.Add(chat_params);
748 ChatInputMenu chatMenu = ChatInputMenu.Cast( GetUIManager().FindMenu(
MENU_CHAT_INPUT) );
751 chatMenu.UpdateChannel();
755 m_ChatChannelText.SetText(ChatInputMenu.GetChannelName(cc_params.param1));
756 m_ChatChannelFadeTimer.FadeIn(m_ChatChannelArea, 0.5,
true);
757 m_ChatChannelHideTimer.Run(2, m_ChatChannelFadeTimer,
"FadeOut",
new Param3<Widget, float, bool>(m_ChatChannelArea, 0.5,
true));
761 case WindowsResizeEventTypeID:
763 m_Hud.OnResizeScreen();
769 PluginDeveloper plugin_developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper) );
770 plugin_developer.OnSetFreeCameraEvent( PlayerBase.Cast( player ), set_free_camera_event_params.param1 );
774 if (networkInputBufferParams)
776 OnInputBufferEvent(networkInputBufferParams.param1);
782 override void OnItemUsed(InventoryItem item, Man owner)
784 if (item && GetUIManager().GetMenu() == NULL)
786 if (item.IsInherited(ItemBook))
788 BookMenu bookMenu = BookMenu.Cast( GetUIManager().EnterScriptedMenu(
MENU_BOOK, NULL) );
791 bookMenu.ReadBook(item);
798 override void SetInputSuppression(
bool state)
800 m_SuppressNextFrame = state;
803 override bool GetInputSuppression()
805 return m_SuppressNextFrame;
810 override void PlayerControlEnable(
bool bForceSupress )
812 super.PlayerControlEnable(bForceSupress);
814 if (m_ControlDisabledMode != -1)
816 switch (m_ControlDisabledMode)
820 RemoveActiveInputExcludes({
"menu"},bForceSupress);
825 RemoveActiveInputExcludes({
"inventory"},bForceSupress);
826 RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
831 RemoveActiveInputExcludes({
"loopedactions"},bForceSupress);
832 RemoveActiveInputRestriction(EInputRestrictors.MAP);
837 RemoveActiveInputExcludes({
"radialmenu"},bForceSupress);
842 RemoveActiveInputExcludes({
"radialmenu"},bForceSupress);
847 m_ControlDisabledMode = -1;
849 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer() );
852 HumanInputController hic = player.GetInputController();
853 hic.LimitsDisableSprint(
false);
859 override void PlayerControlDisable(
int mode)
861 super.PlayerControlDisable(mode);
867 AddActiveInputExcludes({
"menu"});
872 AddActiveInputExcludes({
"inventory"});
873 AddActiveInputRestriction(EInputRestrictors.INVENTORY);
878 AddActiveInputExcludes({
"loopedactions"});
879 AddActiveInputRestriction(EInputRestrictors.MAP);
884 AddActiveInputExcludes({
"radialmenu"});
889 AddActiveInputExcludes({
"radialmenu"});
894 Debug.Log(
"Unknown controls disable mode");
899 m_ControlDisabledMode = mode;
901 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer() );
904 ItemBase item = player.GetItemInHands();
905 if (item && item.IsWeapon())
906 player.RequestResetADSSync();
911 override void RemoveActiveInputExcludes(array<string> excludes,
bool bForceSupress =
false)
913 super.RemoveActiveInputExcludes(excludes,bForceSupress);
915 if (excludes.Count() != 0)
917 bool changed =
false;
919 if (m_ActiveInputExcludeGroups)
921 foreach (
string excl : excludes)
923 if (m_ActiveInputExcludeGroups.Find(excl) != -1)
925 m_ActiveInputExcludeGroups.RemoveItem(excl);
937 GetUApi().SupressNextFrame(bForceSupress);
942 override void RemoveActiveInputRestriction(
int restrictor)
949 case EInputRestrictors.INVENTORY:
951 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(
false);
954 case EInputRestrictors.MAP:
956 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(
false);
961 if (m_ActiveInputRestrictions && m_ActiveInputRestrictions.Find(restrictor) != -1)
963 m_ActiveInputRestrictions.RemoveItem(restrictor);
969 override void AddActiveInputExcludes(array<string> excludes)
971 super.AddActiveInputExcludes(excludes);
973 if (excludes.Count() != 0)
975 bool changed =
false;
976 if (!m_ActiveInputExcludeGroups)
978 m_ActiveInputExcludeGroups =
new array<string>;
981 foreach (
string excl : excludes)
983 if (m_ActiveInputExcludeGroups.Find(excl) == -1)
985 m_ActiveInputExcludeGroups.Insert(excl);
994 GetUApi().SupressNextFrame(
true);
1001 override void AddActiveInputRestriction(
int restrictor)
1004 if (restrictor > -1)
1008 case EInputRestrictors.INVENTORY:
1010 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(
true);
1011 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer() );
1014 ItemBase item = player.GetItemInHands();
1015 if (item && item.IsWeapon())
1016 player.RequestResetADSSync();
1020 case EInputRestrictors.MAP:
1022 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(
true);
1027 if (!m_ActiveInputRestrictions)
1029 m_ActiveInputRestrictions =
new array<int>;
1031 if (m_ActiveInputRestrictions.Find(restrictor) == -1)
1033 m_ActiveInputRestrictions.Insert(restrictor);
1039 override void RefreshExcludes()
1041 m_ProcessInputExcludes =
true;
1051 GetUApi().ActivateExclude(excl);
1066 for (
int i = 0; i < count; i++)
1078 GetUApi().SupressNextFrame(bForceSupress);
1084 bool active =
false;
1117 GetUIManager().CloseAll();
1123 if( GetUIManager() )
1125 GetUIManager().HideDialog();
1126 GetUIManager().CloseAll();
1137 #ifdef PLATFORM_CONSOLE
1138 IngameHud hud = IngameHud.Cast(
GetHud() );
1143 hud.GetHudPanelWidget().SetPos( 0, -0.055 );
1147 hud.GetHudPanelWidget().SetPos( 0, 0 );
1157 if ( !menu &&
g_Game.GetPlayer().GetHumanInventory().CanOpenInventory() && !
g_Game.GetPlayer().IsInventorySoftLocked() )
1169 AddActiveInputExcludes({
"inventory"});
1170 AddActiveInputRestriction(EInputRestrictors.INVENTORY);
1179 RemoveActiveInputExcludes({
"inventory"},
false);
1180 RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
1212 int level =
g_Game.GetVoiceLevel();
1215 AddActiveInputExcludes({
"menu"});
1220 RemoveActiveInputExcludes({
"menu"},
true);
1226 GetHud().ShowVehicleInfo();
1232 GetHud().HideVehicleInfo();
1271 if (
g_Game.IsClient() &&
g_Game.GetGameState() != DayZGameState.IN_GAME )
1286 if (!menu || !menu.IsVisible())
1291 AddActiveInputExcludes({
"menu"});
1292 AddActiveInputRestriction(EInputRestrictors.INVENTORY);
1302 int menu_id = menu.GetID();
1309 RemoveActiveInputExcludes({
"menu"},
true);
1310 RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
1336 if (menu && menu.GetID() !=
MENU_LOGOUT && menu.IsClosing())
1341 if (!player || player.IsDamageDestroyed())
1401 if (um && !um.IsMenuOpen(
MENU_MAP))
1406 um.EnterScriptedMenu(
MENU_MAP, null);
1408 mission.AddActiveInputExcludes({
"map"});
1409 mission.AddActiveInputRestriction(EInputRestrictors.MAP);
1445 m_DebugMonitor.SetPosition(MiscGameplayFunctions.TruncateVec(player.GetPosition(),1));
1449 float currFPS =
g_Game.GetAvgFPS(10);
1450 float minFPS, maxFPS, avgFPS;
1451 g_Game.GetFPSStats(minFPS, maxFPS, avgFPS);
1478 return hold_action_time;
1490#ifdef DIAG_DEVELOPER
1496 bool bState = diagmenu.m_HairHidingStateMap.Get(i);
1497 string selectionState;
1499 selectionState =
"Hidden";
1501 selectionState =
"Shown";
1502 string selectionName = diagmenu.m_HairSelectionArray.Get(i);
1504 DbgUI.BeginCleanupScope();
1505 DbgUI.Begin(
"Hair Debug", 50, 150);
1506 DbgUI.Text(
"Current Hair Selection:" + selectionName);
1507 DbgUI.Text(
"State: " + selectionState);
1510 DbgUI.EndCleanupScope();
1514 DbgUI.BeginCleanupScope();
1515 DbgUI.Begin(
"Hair Debug", 50, 50);
1517 DbgUI.EndCleanupScope();
1534 if ( voiceKey <= level )
1536 voiceWidget.SetAlpha(1.0);
1537 voiceWidget.Show(
true);
1540 timer.FadeOut(voiceWidget, 3.0);
1543 voiceWidget.Show(
false);
1599 voiceWidget.Show(
false);
1610 m_Note = NoteMenu.Cast(menu);
1615 #ifdef DIAG_DEVELOPER
1626 g_Game.GetSoundScene().SetSoundVolume(
g_Game.m_volume_sound,1);
1627 g_Game.GetSoundScene().SetSpeechExVolume(
g_Game.m_volume_speechEX,1);
1628 g_Game.GetSoundScene().SetMusicVolume(
g_Game.m_volume_music,1);
1629 g_Game.GetSoundScene().SetVOIPVolume(
g_Game.m_volume_VOIP,1);
1630 g_Game.GetSoundScene().SetRadioVolume(
g_Game.m_volume_radio,1);
1645 return m_ActiveRefresherLocations;
1683 g_Game.GetMission().HideInventory();
1686 uiManager.CloseAll();
1703 if (
m_ConnectionMenu && (!dayzPlayer.IsAlive() || dayzPlayer.IsUnconscious()))
1711 amb = player.GetActionManager();
1715 action = amb.GetRunningAction();
1716 if (action && amb.GetActionState(action) !=
UA_NONE)
1718 amb.RequestInterruptAction();
1729 g_Game.GetMission().HideInventory();
1732 uiManager.CloseAll();
1747 amb = player.GetActionManager();
1751 action = amb.GetRunningAction();
1752 if (action && amb.GetActionState(action) !=
UA_NONE)
1754 amb.RequestInterruptAction();
1762 return m_ExitButtonDisabledRemainingTime;
1767 m_ExitButtonDisabledRemainingTime = value;