73 m_Hud =
new IngameHud;
89 if (
g_Game.GetUIManager() &&
g_Game.GetUIManager().ScreenFadeVisible())
91 g_Game.GetUIManager().ScreenFadeOut(0);
112 #ifdef DIAG_DEVELOPER
113 if (!
g_Game.IsMultiplayer())
175 m_HudDebug.Init(
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/debug/day_z_hud_debug.layout") );
181 #ifndef DIAG_DEVELOPER
182 #ifdef BUILD_EXPERIMENTAL
195 g_Game.SetConnecting(
false);
197#ifndef FEATURE_CURSOR
202 g_Game.SetMissionState(DayZGame.MISSION_STATE_GAME);
205 #ifdef DIAG_DEVELOPER
206 if (!
g_Game.IsMultiplayer())
230 player.OnScheduledTick(timeslice);
232 if (
g_Game.m_AutotestEnabled)
250 if( mute_list && mute_list.Count() > 0 )
253 rpc.
Write(mute_list);
254 rpc.
Send(null,
ERPCs.RPC_USER_SYNC_PERMISSIONS,
true, null);
260 super.UpdateInputDevicesAvailability();
262 g_Game.GetInput().UpdateConnectedInputDeviceList();
263 g_Game.UpdateInputDeviceDisconnectWarning();
279#ifndef FEATURE_CURSOR
280 g_Game.GetUIManager().ShowUICursor(
false);
284 g_Game.SetMissionState( DayZGame.MISSION_STATE_FINNISH );
290 UpdateInputDeviceDiag();
294 if (GetTimeStamp() == 0)
313 Man player =
g_Game.GetPlayer();
316 UpdateDummyScheduler();
325 bool manualInputUnlockProcessed =
false;
330 #ifdef DIAG_DEVELOPER
337 localPlacingHologram = playerPB.GetHologramLocal();
338 if (localPlacingHologram)
342 #ifdef DIAG_DEVELOPER
354 runningAction = playerPB.GetActionManager().GetRunningAction();
357#ifdef PLATFORM_CONSOLE
359 if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalValue() && !menu)
367 else if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalRelease())
372 if (playerPB && !playerPB.IsSprinting())
378 manualInputUnlockProcessed =
true;
382 if (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalPress() && playerPB)
385 if ( playerPB.IsAlive() && !playerPB.IsRaised() && !playerPB.IsUnconscious() && !playerPB.GetCommand_Vehicle() )
389 RadialQuickbarMenu.OpenMenu();
394 bool b1 = RadialQuickbarMenu.GetItemToAssign() != null;
396 if (
GetUIManager().IsMenuOpen(
MENU_RADIAL_QUICKBAR ) && (!RadialQuickbarMenu.GetMenuInstance().GetParentMenu() || RadialQuickbarMenu.GetMenuInstance().GetParentMenu() != inventory) && (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalRelease() || !
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalValue()))
398 RadialQuickbarMenu.CloseMenu();
402 if ((RadialQuickbarMenu.instance && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() == inventory) &&
GetUApi().GetInputByID(UAUIQuickbarRadialInventoryOpen).LocalRelease())
407 RadialQuickbarMenu.CloseMenu();
408 RadialQuickbarMenu.SetItemToAssign(NULL);
421 if (playerPB.IsRaised() || playerPB.IsInRasedProne())
426 manualInputUnlockProcessed =
true;
435 if (playerPB.IsRaised())
443 manualInputUnlockProcessed =
true;
453 manualInputUnlockProcessed =
true;
463 if (manualInputUnlockProcessed)
469 if (
GetUApi().GetInputByID(UAUIGesturesOpen).LocalPress() && playerPB)
472 if ( !playerPB.IsRaised() && (playerPB.GetActionManager().ActionPossibilityCheck(playerPB.m_MovementState.m_CommandTypeId) || playerPB.IsEmotePlaying()) && !playerPB.GetCommand_Vehicle() )
476 GesturesMenu.OpenMenu();
477 m_Hud.ShowHudUI(
false);
482 if (
GetUApi().GetInputByID(UAUIGesturesOpen).LocalRelease() ||
GetUApi().GetInputByID(UAUIGesturesOpen).LocalValue() == 0 )
487 GesturesMenu.CloseMenu();
488 m_Hud.ShowHudUI(
true );
510 if (
GetUApi().GetInputByID(UAGear).LocalPress())
523 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress() && menu && inventory && menu == inventory)
528 #ifndef PLATFORM_CONSOLE
542 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalHold())
547 m_Hud.ShowHudPlayer(
m_Hud.GetHudVisibility().IsContextFlagActive(EHudContextFlags.HUD_HIDE));
551 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalRelease())
555 m_Hud.ShowQuickbarPlayer(
m_Hud.GetHudVisibility().IsContextFlagActive(EHudContextFlags.QUICKBAR_HIDE));
560 if (
GetUApi().GetInputByID(UAZeroingUp).LocalPress() ||
GetUApi().GetInputByID(UAZeroingDown).LocalPress() ||
GetUApi().GetInputByID(UAToggleWeapons).LocalPress())
562 m_Hud.ZeroingKeyPress();
569 if (
GetUApi().GetInputByID(UANextActionCategory).LocalPress())
573 else if (
GetUApi().GetInputByID(UAPrevActionCategory).LocalPress())
577 else if (
GetUApi().GetInputByID(UANextAction).LocalPress())
581 else if (
GetUApi().GetInputByID(UAPrevAction).LocalPress())
592 localPlacingHologram = playerPB.GetHologramLocal();
593 if (menu == null && playerPB.IsPlacingLocal() && localPlacingHologram && localPlacingHologram.
GetParentEntity() && localPlacingHologram.
GetParentEntity().PlacementCanBeRotated())
595 if (
GetUApi().GetInputByID(UANextAction).LocalRelease())
600 if (
GetUApi().GetInputByID(UAPrevAction).LocalRelease())
621 int life_state = player.GetPlayerState();
628 for (i = 0; i < 5; i++)
635 for (i = 0; i < 6; i++)
647 if (
GetUApi().GetInputByID(UAGear).LocalPress())
654 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
679 InGameMenuXbox menu_xb = InGameMenuXbox.Cast(
g_Game.GetUIManager().GetMenu());
680 if (!
g_Game.GetUIManager().ScreenFadeVisible() && (!menu_xb || !menu_xb.IsOnlineOpen() && !menu_xb.FeedbackDialogVisible()))
682 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress())
686 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
691 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
693 if (menu_xb && menu_xb.IsOnlineOpen())
695 menu_xb.CloseOnline();
700 else if (
GetUApi().GetInputByID(UAUIMenu).LocalPress())
713 if (!
g_Game.IsMultiplayer())
714 m_WorldData.UpdateBaseEnvTemperature( timeslice );
717 #ifdef DIAG_DEVELOPER
718 if (!
GetGame().IsMultiplayer())
739 super.OnUpdate( timeslice );
744 super.OnKeyPress(key);
754 super.OnKeyRelease(key);
759 super.OnEvent(eventTypeId, params);
761 Man player =
g_Game.GetPlayer();
778 chatMenu.UpdateChannel();
788 case WindowsResizeEventTypeID:
790 m_Hud.OnResizeScreen();
796 PluginDeveloper plugin_developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper) );
797 plugin_developer.OnSetFreeCameraEvent(
PlayerBase.Cast( player ), set_free_camera_event_params.param1 );
801 if (networkInputBufferParams)
813 if (item.IsInherited(ItemBook))
818 bookMenu.ReadBook(item);
825 override void SetInputSuppression(
bool state)
827 m_SuppressNextFrame = state;
830 override bool GetInputSuppression()
832 return m_SuppressNextFrame;
839 super.PlayerControlEnable(bForceSupress);
888 super.PlayerControlDisable(mode);
921 Debug.
Log(
"Unknown controls disable mode");
931 ItemBase item = player.GetItemInHands();
932 if (item && item.IsWeapon())
933 player.RequestResetADSSync();
940 super.RemoveActiveInputExcludes(excludes,bForceSupress);
942 if (excludes.Count() != 0)
944 bool changed =
false;
948 foreach (
string excl : excludes)
976 case EInputRestrictors.INVENTORY:
981 case EInputRestrictors.MAP:
986 case EInputRestrictors.SURRENDER_TRANSITION:
1003 super.AddActiveInputExcludes(excludes);
1005 if (excludes.Count() != 0)
1007 bool changed =
false;
1013 foreach (
string excl : excludes)
1036 if (restrictor > -1)
1040 case EInputRestrictors.INVENTORY:
1046 ItemBase item = player.GetItemInHands();
1047 if (item && item.IsWeapon())
1048 player.RequestResetADSSync();
1052 case EInputRestrictors.MAP:
1057 case EInputRestrictors.SURRENDER_TRANSITION:
1103 for (
int i = 0; i < count; i++)
1121 bool active =
false;
1174 #ifdef PLATFORM_CONSOLE
1175 IngameHud hud = IngameHud.Cast(
GetHud() );
1180 hud.GetHudPanelWidget().SetPos( 0, -0.055 );
1184 hud.GetHudPanelWidget().SetPos( 0, 0 );
1194 if ( !menu &&
g_Game.GetPlayer().GetHumanInventory().CanOpenInventory() && !
g_Game.GetPlayer().IsInventorySoftLocked() )
1249 int level =
g_Game.GetVoiceLevel();
1308 if (
g_Game.IsClient() &&
g_Game.GetGameState() != DayZGameState.IN_GAME )
1323 if (!menu || !menu.IsVisible())
1339 int menu_id = menu.GetID();
1373 if (menu && menu.GetID() !=
MENU_LOGOUT && menu.IsClosing())
1378 if (!player || player.IsDamageDestroyed())
1391 g_Game.LogoutRequestTime();
1418 invite.StartCountdown(time);
1469 mission.AddActiveInputExcludes({
"map"});
1470 mission.AddActiveInputRestriction(EInputRestrictors.MAP);
1506 m_DebugMonitor.SetPosition(MiscGameplayFunctions.TruncateVec(player.GetPosition(),1));
1513 float currFPS =
g_Game.GetAvgFPS(10);
1514 float minFPS, maxFPS, avgFPS;
1515 g_Game.GetFPSStats(minFPS, maxFPS, avgFPS);
1542 return hold_action_time;
1554#ifdef DIAG_DEVELOPER
1560 bool bState = diagmenu.m_HairHidingStateMap.Get(i);
1561 string selectionState;
1563 selectionState =
"Hidden";
1565 selectionState =
"Shown";
1566 string selectionName = diagmenu.m_HairSelectionArray.Get(i);
1570 DbgUI.
Text(
"Current Hair Selection:" + selectionName);
1598 if ( voiceKey <= level )
1600 voiceWidget.SetAlpha(1.0);
1601 voiceWidget.Show(
true);
1604 timer.FadeOut(voiceWidget, 3.0);
1607 voiceWidget.Show(
false);
1663 voiceWidget.Show(
false);
1674 m_Note = NoteMenu.Cast(menu);
1679 #ifdef DIAG_DEVELOPER
1690 g_Game.GetSoundScene().SetSoundVolume(
g_Game.m_volume_sound,1);
1691 g_Game.GetSoundScene().SetSpeechExVolume(
g_Game.m_volume_speechEX,1);
1692 g_Game.GetSoundScene().SetMusicVolume(
g_Game.m_volume_music,1);
1693 g_Game.GetSoundScene().SetVOIPVolume(
g_Game.m_volume_VOIP,1);
1694 g_Game.GetSoundScene().SetRadioVolume(
g_Game.m_volume_radio,1);
1709 return m_ActiveRefresherLocations;
1747 g_Game.GetMission().HideInventory();
1767 if (
m_ConnectionMenu && (!dayzPlayer.IsAlive() || dayzPlayer.IsUnconscious()))
1775 amb = player.GetActionManager();
1779 action = amb.GetRunningAction();
1780 if (action && amb.GetActionState(action) !=
UA_NONE)
1782 amb.RequestInterruptAction();
1793 g_Game.GetMission().HideInventory();
1811 amb = player.GetActionManager();
1815 action = amb.GetRunningAction();
1816 if (action && amb.GetActionState(action) !=
UA_NONE)
1818 amb.RequestInterruptAction();
void ActionManagerBase(PlayerBase player)
ActionUnfoldMapCB ActionBaseCB ActionUnfoldMap()
PluginBase GetPlugin(typename plugin_type)
static void Update(float deltaTime)
static BunkerBroadcastHandler GetInstance()
static bool GetUse3DMap()
static bool GetMapIgnoreMapOwnership()
Super root of all classes in Enforce script.
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
float GetEnvironmentTemperature()
static void CreateZones()
EntityAI GetParentEntity()
void AddProjectionRotation(float addition)
void UpdateHologram(float timeslice)
void SubtractProjectionRotation(float subtraction)
EntityAI GetSelectedItem()
static ItemManager GetInstance()
static bool IsLogsEnable()
override void EnableAllInputs(bool bForceSupress=false)
Removes all active input excludes and restrictions.
override void CreateDebugMonitor()
override void PlayerControlEnable(bool bForceSupress)
Deprecated; removes last input exclude and associated controls restrictions.
void TakeOverLogoutMenu()
float GetHoldActionTime()
override UIScriptedMenu GetNoteMenu()
void SendMuteListToServer(map< string, bool > mute_list)
override void AddActiveInputExcludes(array< string > excludes)
Adds one or more exclude groups to disable and refreshes excludes.
ref Watermark m_Watermark
int m_ControlDisabledMode
ref ActionMenu m_ActionMenu
override void OnUpdate(float timeslice)
override void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
Removes one or more exclude groups and refreshes excludes.
void SetActionUpTime(int time_up)
override map< int, ref WidgetFadeTimer > GetVoiceLevelTimers()
override void OnPlayerRespawned(Man player)
float GetExitButtonDisabledRemainingTime()
override void ShowInventory()
override void PlayerControlDisable(int mode)
Deprecated; simple input restrictions.
ref map< int, ImageWidget > m_VoiceLevelsWidgets
override bool IsInputExcludeActive(string exclude)
Returns true if the particular input exclude group had been activated via script and is active.
ref array< string > m_ActiveInputExcludeGroups
override void StartLogoutMenu(int time)
ImageWidget m_MicrophoneIcon
override bool IsControlDisabled()
returns if ANY exclude groups, restriction (or deprecated disable, if applicable) is active
override map< int, ImageWidget > GetVoiceLevelWidgets()
override ImageWidget GetMicrophoneIcon()
override void SetNoteMenu(UIScriptedMenu menu)
void TickScheduler(float timeslice)
override void HideDebugMonitor()
override void OnKeyRelease(int key)
void HandleMapToggleByKeyboardShortcut(Man player)
override void HideCrosshairVisibility()
override void RefreshCrosshairVisibility()
ref ScriptInvoker m_OnConnectivityChanged
override bool IsInputRestrictionActive(int restriction)
Returns true if the particular 'restriction' (those govern special behaviour outside regular input ex...
override void SetVoNActive(bool active)
ref DebugMonitor m_DebugMonitor
override bool IsMissionGameplay()
override void OnEvent(EventType eventTypeId, Param params)
void ShowHairDebugValues(bool state)
BunkerBroadcastHandler m_BunkerBroadcastHandler
ref WidgetFadeTimer m_ChatChannelFadeTimer
override int GetControlDisabledMode()
(mostly)DEPRECATED; only set on the old 'PlayerControlDisable' method
ref array< int > m_ActiveInputRestrictions
override bool IsPlayerRespawning()
override void AbortMission()
ref WidgetFadeTimer m_MicFadeTimer
const int HOLD_LIMIT_TIME
void SetActionDownTime(int time_down)
override void HideVoiceLevelWidgets()
override bool IsVoNActive()
ref Timer m_ChatChannelHideTimer
InventoryMenu GetInventory()
override void OnKeyPress(int key)
TextWidget m_ChatChannelText
override void RefreshExcludes()
queues refresh of input excludes
ScriptInvoker GetConnectivityInvoker()
override int GetRespawnModeClient()
UIScriptedMenu m_ConnectionMenu
override void AddActiveInputRestriction(int restrictor)
Adds one input restriction (specific behaviour oudside regular excludes, defined below)
override void HideInventory()
override void CreateLogoutMenu(UIMenuPanel parent)
override GameplayEffectWidgets GetEffectWidgets()
void OnInputBufferEvent(bool state)
ref map< int, ref WidgetFadeTimer > m_VoiceLevelTimers
void MoveHudForInventory(bool inv_open)
void UpdateDebugMonitor()
override void OnMissionFinish()
float m_ExitButtonDisabledRemainingTime
bool m_ProcessInputExcludes
override void SetPlayerRespawning(bool state)
void PerformRefreshExcludes()
applies queued excludes (0 == clear excludes)
void SetExitButtonDisabledRemainingTime(float value)
ref GameplayEffectWidgets m_EffectWidgets
override void RemoveActiveInputRestriction(int restrictor)
Removes one restriction (specific behaviour oudside regular excludes, defined below)
override void OnMissionStart()
bool IsMapUnfoldActionRunning(ActionBase pAction)
ref Timer m_ToggleHudTimer
override void SetRespawnModeClient(int mode)
override WidgetFadeTimer GetMicWidgetFadeTimer()
override void UpdateVoiceLevelWidgets(int level)
override void UpdateInputDevicesAvailability()
ref InventoryMenu m_InventoryMenu
override void OnItemUsed(InventoryItem item, Man owner)
override array< vector > GetActiveRefresherLocations()
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Static component of PPE manager, used to hold the instance.
Deprecated; 'PPEManager' used instead.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
static ref ScriptInvoker Event_OnFrameUpdate
Static invoker for the SEffectManager.Event_OnFrameUpdate called form MissionGameplay....
Manager class for managing Effect (EffectParticle, EffectSound)
ScriptInvoker Class provide list of callbacks usage:
proto native void Send(Object target, int rpc_type, bool guaranteed, PlayerIdentity recipient=NULL)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto bool Write(void value_out)
static void RegisterEvents()
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
proto native void ScreenFadeOut(float duration)
bool CloseMenu(int id)
Close menu with specific ID (see MenuID)
proto native UIScriptedMenu EnterScriptedMenu(int id, UIMenuPanel parent)
Create & open menu with specific id (see MenuID) and set its parent.
void ShowUICursor(bool visible)
bool IsMenuOpen(int id)
Returns true if menu with specific ID is opened (see MenuID)
bool CloseAll()
Close all opened menus.
proto native void HideDialog()
proto native UIScriptedMenu ShowScriptedMenu(UIScriptedMenu menu, UIMenuPanel parent)
proto native void HideScriptedMenu(UIScriptedMenu menu)
static void SpawnAllTriggerCarriers()
static VONManagerBase GetInstance()
Main way to access VONManager functionality from script.
void HandleInput(Input inp)
Manager class which handles Voice-over-network functionality while player is connected to a server.
void ResetRefreshCounter()
static VicinityItemManager GetInstance()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Param1< bool > NetworkInputBufferEventParams
isFull
const EventType SetFreeCameraEventTypeID
params: SetFreeCameraEventParams
Param4< int, string, string, string > ChatMessageEventParams
channel, from, text, color config class
Param1< int > ChatChannelEventParams
const EventType NetworkInputBufferEventTypeID
params: NetworkInputBufferEventParams
const EventType ChatChannelEventTypeID
params: ChatChannelEventParams
Param1< FreeDebugCamera > SetFreeCameraEventParams
Camera.
const EventType ChatMessageEventTypeID
params: ChatMessageEventParams
static proto native void End()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
static proto void BeginCleanupScope()
static proto native void EndCleanupScope()
const int INPUT_EXCLUDE_MOUSE_RADIAL
const int INPUT_EXCLUDE_ALL
const int INPUT_EXCLUDE_INVENTORY
const int INPUT_EXCLUDE_MAP
const int INPUT_EXCLUDE_MOUSE_ALL
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto native bool IsCLIParam(string param)
Returns if command line argument is present.