67 m_Hud =
new IngameHud;
83 if (
g_Game.GetUIManager() &&
g_Game.GetUIManager().ScreenFadeVisible())
85 g_Game.GetUIManager().ScreenFadeOut(0);
106 #ifdef DIAG_DEVELOPER
107 if (!
g_Game.IsMultiplayer())
168 m_HudDebug.Init(
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/debug/day_z_hud_debug.layout") );
174 #ifndef DIAG_DEVELOPER
175 #ifdef BUILD_EXPERIMENTAL
188 g_Game.SetConnecting(
false);
190#ifndef FEATURE_CURSOR
195 g_Game.SetMissionState(DayZGame.MISSION_STATE_GAME);
198 #ifdef DIAG_DEVELOPER
199 if (!
g_Game.IsMultiplayer())
221 player.OnScheduledTick(timeslice);
223 if (
g_Game.m_AutotestEnabled)
241 if( mute_list && mute_list.Count() > 0 )
244 rpc.
Write(mute_list);
245 rpc.
Send(null,
ERPCs.RPC_USER_SYNC_PERMISSIONS,
true, null);
251 super.UpdateInputDevicesAvailability();
253 g_Game.GetInput().UpdateConnectedInputDeviceList();
254 g_Game.UpdateInputDeviceDisconnectWarning();
270#ifndef FEATURE_CURSOR
271 g_Game.GetUIManager().ShowUICursor(
false);
275 g_Game.SetMissionState( DayZGame.MISSION_STATE_FINNISH );
281 UpdateInputDeviceDiag();
285 if (GetTimeStamp() == 0)
304 Man player =
g_Game.GetPlayer();
307 UpdateDummyScheduler();
316 bool manualInputUnlockProcessed =
false;
321 #ifdef DIAG_DEVELOPER
328 localPlacingHologram = playerPB.GetHologramLocal();
329 if (localPlacingHologram)
333 #ifdef DIAG_DEVELOPER
345 runningAction = playerPB.GetActionManager().GetRunningAction();
348#ifdef PLATFORM_CONSOLE
350 if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalValue() && !menu)
358 else if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalRelease())
363 if (playerPB && !playerPB.IsSprinting())
369 manualInputUnlockProcessed =
true;
373 if (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalPress() && playerPB)
376 if ( playerPB.IsAlive() && !playerPB.IsRaised() && !playerPB.IsUnconscious() && !playerPB.GetCommand_Vehicle() )
380 RadialQuickbarMenu.OpenMenu();
385 bool b1 = RadialQuickbarMenu.GetItemToAssign() != null;
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);
412 if (playerPB.IsRaised() || playerPB.IsInRasedProne())
417 manualInputUnlockProcessed =
true;
426 if (playerPB.IsRaised())
434 manualInputUnlockProcessed =
true;
444 manualInputUnlockProcessed =
true;
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() )
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 );
501 if (
GetUApi().GetInputByID(UAGear).LocalPress())
514 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress() && menu && inventory && menu == inventory)
519 #ifndef PLATFORM_CONSOLE
533 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalHold())
538 m_Hud.ShowHudPlayer(
m_Hud.GetHudVisibility().IsContextFlagActive(EHudContextFlags.HUD_HIDE));
542 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalRelease())
546 m_Hud.ShowQuickbarPlayer(
m_Hud.GetHudVisibility().IsContextFlagActive(EHudContextFlags.QUICKBAR_HIDE));
551 if (
GetUApi().GetInputByID(UAZeroingUp).LocalPress() ||
GetUApi().GetInputByID(UAZeroingDown).LocalPress() ||
GetUApi().GetInputByID(UAToggleWeapons).LocalPress())
553 m_Hud.ZeroingKeyPress();
560 if (
GetUApi().GetInputByID(UANextActionCategory).LocalPress())
564 else if (
GetUApi().GetInputByID(UAPrevActionCategory).LocalPress())
568 else if (
GetUApi().GetInputByID(UANextAction).LocalPress())
572 else if (
GetUApi().GetInputByID(UAPrevAction).LocalPress())
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())
612 int life_state = player.GetPlayerState();
619 for (i = 0; i < 5; i++)
626 for (i = 0; i < 6; i++)
638 if (
GetUApi().GetInputByID(UAGear).LocalPress())
645 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
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())
704 if (!
g_Game.IsMultiplayer())
716 super.OnUpdate( timeslice );
721 super.OnKeyPress(key);
727 super.OnKeyRelease(key);
732 super.OnEvent(eventTypeId, params);
734 Man player =
g_Game.GetPlayer();
751 chatMenu.UpdateChannel();
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)
786 if (item.IsInherited(ItemBook))
791 bookMenu.ReadBook(item);
798 override void SetInputSuppression(
bool state)
800 m_SuppressNextFrame = state;
803 override bool GetInputSuppression()
805 return m_SuppressNextFrame;
812 super.PlayerControlEnable(bForceSupress);
861 super.PlayerControlDisable(mode);
894 Debug.
Log(
"Unknown controls disable mode");
904 ItemBase item = player.GetItemInHands();
905 if (item && item.IsWeapon())
906 player.RequestResetADSSync();
913 super.RemoveActiveInputExcludes(excludes,bForceSupress);
915 if (excludes.Count() != 0)
917 bool changed =
false;
921 foreach (
string excl : excludes)
949 case EInputRestrictors.INVENTORY:
954 case EInputRestrictors.MAP:
971 super.AddActiveInputExcludes(excludes);
973 if (excludes.Count() != 0)
975 bool changed =
false;
981 foreach (
string excl : excludes)
1004 if (restrictor > -1)
1008 case EInputRestrictors.INVENTORY:
1014 ItemBase item = player.GetItemInHands();
1015 if (item && item.IsWeapon())
1016 player.RequestResetADSSync();
1020 case EInputRestrictors.MAP:
1066 for (
int i = 0; i < count; i++)
1084 bool active =
false;
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() )
1212 int level =
g_Game.GetVoiceLevel();
1226 GetHud().ShowVehicleInfo();
1232 GetHud().HideVehicleInfo();
1271 if (
g_Game.IsClient() &&
g_Game.GetGameState() != DayZGameState.IN_GAME )
1286 if (!menu || !menu.IsVisible())
1302 int menu_id = menu.GetID();
1336 if (menu && menu.GetID() !=
MENU_LOGOUT && menu.IsClosing())
1341 if (!player || player.IsDamageDestroyed())
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);
1506 DbgUI.
Text(
"Current Hair Selection:" + selectionName);
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();
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();
1747 amb = player.GetActionManager();
1751 action = amb.GetRunningAction();
1752 if (action && amb.GetActionState(action) !=
UA_NONE)
1754 amb.RequestInterruptAction();
void ActionManagerBase(PlayerBase player)
ActionUnfoldMapCB ActionBaseCB ActionUnfoldMap()
PluginBase GetPlugin(typename plugin_type)
static void Update(float deltaTime)
static bool GetUse3DMap()
static bool GetMapIgnoreMapOwnership()
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.
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.
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)
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 UIScriptedMenu EnterScriptedMenu(int id, UIMenuPanel parent)
Create & open menu with specific id (see MenuID) and set its parent.
bool IsMenuOpen(int id)
Returns true if menu with specific ID is opened (see MenuID)
bool CloseAll()
Close all opened menus.
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
proto native bool IsCLIParam(string param)
Returns if command line argument is present.