65 m_Hud =
new IngameHud;
81 if (
g_Game.GetUIManager() &&
g_Game.GetUIManager().ScreenFadeVisible())
83 g_Game.GetUIManager().ScreenFadeOut(0);
104 #ifdef DIAG_DEVELOPER
105 if (!
GetGame().IsMultiplayer())
166 m_HudDebug.Init(
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/debug/day_z_hud_debug.layout") );
172 #ifndef DIAG_DEVELOPER
173 #ifdef BUILD_EXPERIMENTAL
186 g_Game.SetConnecting(
false);
188#ifndef FEATURE_CURSOR
193 g_Game.SetMissionState(DayZGame.MISSION_STATE_GAME);
209 player.OnScheduledTick(timeslice);
211 if (
g_Game.m_AutotestEnabled)
229 if( mute_list && mute_list.Count() > 0 )
232 rpc.
Write(mute_list);
233 rpc.
Send(null,
ERPCs.RPC_USER_SYNC_PERMISSIONS,
true, null);
239 super.UpdateInputDevicesAvailability();
241 g_Game.GetInput().UpdateConnectedInputDeviceList();
242 g_Game.UpdateInputDeviceDisconnectWarning();
258#ifndef FEATURE_CURSOR
259 g_Game.GetUIManager().ShowUICursor(
false);
263 g_Game.SetMissionState( DayZGame.MISSION_STATE_FINNISH );
269 UpdateInputDeviceDiag();
273 if (GetTimeStamp() == 0)
295 UpdateDummyScheduler();
304 bool manualInputUnlockProcessed =
false;
308 #ifdef DIAG_DEVELOPER
315 if ( playerPB.GetHologramLocal() )
317 playerPB.GetHologramLocal().UpdateHologram( timeslice );
319 #ifdef DIAG_DEVELOPER
331 runningAction = playerPB.GetActionManager().GetRunningAction();
334#ifdef PLATFORM_CONSOLE
336 if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalValue() && !menu)
344 else if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalRelease())
349 if (playerPB && !playerPB.IsSprinting())
355 manualInputUnlockProcessed =
true;
359 if (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalPress() && playerPB)
362 if ( playerPB.IsAlive() && !playerPB.IsRaised() && !playerPB.IsUnconscious() && !playerPB.GetCommand_Vehicle() )
366 RadialQuickbarMenu.OpenMenu();
367 m_Hud.ShowHudUI(
false );
372 bool b1 = RadialQuickbarMenu.GetItemToAssign() != null;
374 if (
GetUIManager().IsMenuOpen(
MENU_RADIAL_QUICKBAR ) && (!RadialQuickbarMenu.GetMenuInstance().GetParentMenu() || RadialQuickbarMenu.GetMenuInstance().GetParentMenu() != inventory) && (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalRelease() || !
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalValue()))
376 RadialQuickbarMenu.CloseMenu();
377 m_Hud.ShowHudUI(
true );
381 if ((RadialQuickbarMenu.instance && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() == inventory) &&
GetUApi().GetInputByID(UAUIQuickbarRadialInventoryOpen).LocalRelease())
386 RadialQuickbarMenu.CloseMenu();
387 RadialQuickbarMenu.SetItemToAssign(NULL);
400 if (playerPB.IsRaised() || playerPB.IsInRasedProne())
405 manualInputUnlockProcessed =
true;
414 if (playerPB.IsRaised())
422 manualInputUnlockProcessed =
true;
432 manualInputUnlockProcessed =
true;
437 if (manualInputUnlockProcessed)
443 if (
GetUApi().GetInputByID(UAUIGesturesOpen).LocalPress() && playerPB)
446 if ( !playerPB.IsRaised() && (playerPB.GetActionManager().ActionPossibilityCheck(playerPB.m_MovementState.m_CommandTypeId) || playerPB.IsEmotePlaying()) && !playerPB.GetCommand_Vehicle() )
450 GesturesMenu.OpenMenu();
451 m_Hud.ShowHudUI(
false);
456 if (
GetUApi().GetInputByID(UAUIGesturesOpen).LocalRelease() ||
GetUApi().GetInputByID(UAUIGesturesOpen).LocalValue() == 0 )
461 GesturesMenu.CloseMenu();
462 m_Hud.ShowHudUI(
true );
484 if (
GetUApi().GetInputByID(UAGear).LocalPress())
497 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress() && menu && inventory && menu == inventory)
502 #ifndef PLATFORM_CONSOLE
516 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalHold())
521 m_Hud.ShowHudPlayer(
m_Hud.GetHudVisibility().IsContextFlagActive(EHudContextFlags.HUD_HIDE));
525 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalRelease())
529 m_Hud.ShowQuickbarPlayer(
m_Hud.GetHudVisibility().IsContextFlagActive(EHudContextFlags.QUICKBAR_HIDE));
534 if (
GetUApi().GetInputByID(UAZeroingUp).LocalPress() ||
GetUApi().GetInputByID(UAZeroingDown).LocalPress() ||
GetUApi().GetInputByID(UAToggleWeapons).LocalPress())
536 m_Hud.ZeroingKeyPress();
543 if (
GetUApi().GetInputByID(UANextActionCategory).LocalPress())
547 else if (
GetUApi().GetInputByID(UAPrevActionCategory).LocalPress())
551 else if (
GetUApi().GetInputByID(UANextAction).LocalPress())
555 else if (
GetUApi().GetInputByID(UAPrevAction).LocalPress())
566 if (menu == NULL && playerPB.IsPlacingLocal() && playerPB.GetHologramLocal().GetParentEntity().PlacementCanBeRotated())
568 if (
GetUApi().GetInputByID(UANextAction).LocalRelease())
570 playerPB.GetHologramLocal().SubtractProjectionRotation(15);
573 if (
GetUApi().GetInputByID(UAPrevAction).LocalRelease())
575 playerPB.GetHologramLocal().AddProjectionRotation(15);
594 int life_state = player.GetPlayerState();
601 for (i = 0; i < 5; i++)
608 for (i = 0; i < 6; i++)
620 if (
GetUApi().GetInputByID(UAGear).LocalPress())
627 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
653 if (!
g_Game.GetUIManager().ScreenFadeVisible() && (!menu_xb || !menu_xb.IsOnlineOpen() && !menu_xb.FeedbackDialogVisible()))
655 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress())
659 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
664 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
666 if (menu_xb && menu_xb.IsOnlineOpen())
668 menu_xb.CloseOnline();
673 else if (
GetUApi().GetInputByID(UAUIMenu).LocalPress())
686 if (!
GetGame().IsMultiplayer())
687 m_WorldData.UpdateBaseEnvTemperature( timeslice );
698 super.OnUpdate( timeslice );
703 super.OnKeyPress(key);
709 super.OnKeyRelease(key);
714 super.OnEvent(eventTypeId, params);
733 chatMenu.UpdateChannel();
743 case WindowsResizeEventTypeID:
745 m_Hud.OnResizeScreen();
751 PluginDeveloper plugin_developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper) );
752 plugin_developer.OnSetFreeCameraEvent(
PlayerBase.Cast( player ), set_free_camera_event_params.param1 );
756 if (networkInputBufferParams)
768 if (item.IsInherited(ItemBook))
773 bookMenu.ReadBook(item);
780 override void SetInputSuppression(
bool state)
782 m_SuppressNextFrame = state;
785 override bool GetInputSuppression()
787 return m_SuppressNextFrame;
794 super.PlayerControlEnable(bForceSupress);
843 super.PlayerControlDisable(mode);
876 Debug.
Log(
"Unknown controls disable mode");
886 ItemBase item = player.GetItemInHands();
887 if (item && item.IsWeapon())
888 player.RequestResetADSSync();
895 super.RemoveActiveInputExcludes(excludes,bForceSupress);
897 if (excludes.Count() != 0)
899 bool changed =
false;
903 foreach (
string excl : excludes)
931 case EInputRestrictors.INVENTORY:
936 case EInputRestrictors.MAP:
953 super.AddActiveInputExcludes(excludes);
955 if (excludes.Count() != 0)
957 bool changed =
false;
963 foreach (
string excl : excludes)
990 case EInputRestrictors.INVENTORY:
996 ItemBase item = player.GetItemInHands();
997 if (item && item.IsWeapon())
998 player.RequestResetADSSync();
1002 case EInputRestrictors.MAP:
1048 for (
int i = 0; i < count; i++)
1066 bool active =
false;
1119 #ifdef PLATFORM_CONSOLE
1120 IngameHud hud = IngameHud.Cast(
GetHud() );
1125 hud.GetHudPanelWidget().SetPos( 0, -0.055 );
1129 hud.GetHudPanelWidget().SetPos( 0, 0 );
1208 GetHud().ShowVehicleInfo();
1214 GetHud().HideVehicleInfo();
1253 if (
g_Game.IsClient() &&
g_Game.GetGameState() != DayZGameState.IN_GAME )
1268 if (!menu || !menu.IsVisible())
1284 int menu_id = menu.GetID();
1318 if (!player || player.IsDamageDestroyed())
1421 m_DebugMonitor.SetPosition(MiscGameplayFunctions.TruncateVec(player.GetPosition(),1));
1426 float minFPS, maxFPS, avgFPS;
1454 return hold_action_time;
1466#ifdef DIAG_DEVELOPER
1472 bool bState = diagmenu.m_HairHidingStateMap.Get(i);
1473 string selectionState;
1475 selectionState =
"Hidden";
1477 selectionState =
"Shown";
1478 string selectionName = diagmenu.m_HairSelectionArray.Get(i);
1482 DbgUI.
Text(
"Current Hair Selection:" + selectionName);
1510 if ( voiceKey <= level )
1512 voiceWidget.SetAlpha(1.0);
1513 voiceWidget.Show(
true);
1516 timer.FadeOut(voiceWidget, 3.0);
1519 voiceWidget.Show(
false);
1575 voiceWidget.Show(
false);
1586 m_Note = NoteMenu.Cast(menu);
1591 #ifdef DIAG_DEVELOPER
1621 return m_ActiveRefresherLocations;
1684 amb = player.GetActionManager();
1688 action = amb.GetRunningAction();
1689 if (action && amb.GetActionState(action) !=
UA_NONE)
1691 amb.RequestInterruptAction();
1718 amb = player.GetActionManager();
1722 action = amb.GetRunningAction();
1723 if (action && amb.GetActionState(action) !=
UA_NONE)
1725 amb.RequestInterruptAction();
void ActionManagerBase(PlayerBase player)
ActionUnfoldMapCB ActionBaseCB ActionUnfoldMap()
int GetID()
Get the ID registered in SEffectManager.
PluginBase GetPlugin(typename plugin_type)
static void Update(float deltaTime)
proto native UIManager GetUIManager()
override ScriptCallQueue GetCallQueue(int call_category)
proto native float GetAvgFPS(int nFrames=64)
Returns average framerate over last n frames.
proto native AbstractSoundScene GetSoundScene()
proto native int GetVoiceLevel(Object player=null)
Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1,...
proto native DayZPlayer GetPlayer()
proto native WorkspaceWidget GetWorkspace()
void GetFPSStats(out float min, out float max, out float avg, int nFrames=64)
Outputs framerate statistics.
proto native Input GetInput()
proto native Mission GetMission()
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.
EntityAI GetSelectedItem()
static ItemManager GetInstance()
static bool IsLogsEnable()
void AddActiveInputRestriction(int restrictor)
void AddActiveInputExcludes(array< string > excludes)
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.
ref array< int > m_ActiveInputRestrictions
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)
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.
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
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()
ref array< string > m_ActiveInputExcludeGroups
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()
bool m_ProcessInputExcludes
override void SetPlayerRespawning(bool state)
void PerformRefreshExcludes()
applies queued excludes (0 == clear excludes)
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)
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 ...
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
proto native CGame GetGame()
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 void SetSoundVolume(float vol, float time)
proto native void SetSpeechExVolume(float vol, float time)
proto native void SetVOIPVolume(float vol, float time)
proto native void SetRadioVolume(float vol, float time)
proto native void SetMusicVolume(float vol, float time)
proto native bool IsCLIParam(string param)
Returns if command line argument is present.