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);
196 #ifdef DIAG_DEVELOPER
197 if (!
GetGame().IsMultiplayer())
219 player.OnScheduledTick(timeslice);
221 if (
g_Game.m_AutotestEnabled)
239 if( mute_list && mute_list.Count() > 0 )
242 rpc.
Write(mute_list);
243 rpc.
Send(null,
ERPCs.RPC_USER_SYNC_PERMISSIONS,
true, null);
249 super.UpdateInputDevicesAvailability();
251 g_Game.GetInput().UpdateConnectedInputDeviceList();
252 g_Game.UpdateInputDeviceDisconnectWarning();
268#ifndef FEATURE_CURSOR
269 g_Game.GetUIManager().ShowUICursor(
false);
273 g_Game.SetMissionState( DayZGame.MISSION_STATE_FINNISH );
279 UpdateInputDeviceDiag();
283 if (GetTimeStamp() == 0)
305 UpdateDummyScheduler();
314 bool manualInputUnlockProcessed =
false;
318 #ifdef DIAG_DEVELOPER
325 if ( playerPB.GetHologramLocal() )
327 playerPB.GetHologramLocal().UpdateHologram( timeslice );
329 #ifdef DIAG_DEVELOPER
341 runningAction = playerPB.GetActionManager().GetRunningAction();
344#ifdef PLATFORM_CONSOLE
346 if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalValue() && !menu)
354 else if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalRelease())
359 if (playerPB && !playerPB.IsSprinting())
365 manualInputUnlockProcessed =
true;
369 if (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalPress() && playerPB)
372 if ( playerPB.IsAlive() && !playerPB.IsRaised() && !playerPB.IsUnconscious() && !playerPB.GetCommand_Vehicle() )
376 RadialQuickbarMenu.OpenMenu();
377 m_Hud.ShowHudUI(
false );
382 bool b1 = RadialQuickbarMenu.GetItemToAssign() != null;
384 if (
GetUIManager().IsMenuOpen(
MENU_RADIAL_QUICKBAR ) && (!RadialQuickbarMenu.GetMenuInstance().GetParentMenu() || RadialQuickbarMenu.GetMenuInstance().GetParentMenu() != inventory) && (
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalRelease() || !
GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalValue()))
386 RadialQuickbarMenu.CloseMenu();
387 m_Hud.ShowHudUI(
true );
391 if ((RadialQuickbarMenu.instance && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() == inventory) &&
GetUApi().GetInputByID(UAUIQuickbarRadialInventoryOpen).LocalRelease())
396 RadialQuickbarMenu.CloseMenu();
397 RadialQuickbarMenu.SetItemToAssign(NULL);
410 if (playerPB.IsRaised() || playerPB.IsInRasedProne())
415 manualInputUnlockProcessed =
true;
424 if (playerPB.IsRaised())
432 manualInputUnlockProcessed =
true;
442 manualInputUnlockProcessed =
true;
447 if (manualInputUnlockProcessed)
453 if (
GetUApi().GetInputByID(UAUIGesturesOpen).LocalPress() && playerPB)
456 if ( !playerPB.IsRaised() && (playerPB.GetActionManager().ActionPossibilityCheck(playerPB.m_MovementState.m_CommandTypeId) || playerPB.IsEmotePlaying()) && !playerPB.GetCommand_Vehicle() )
460 GesturesMenu.OpenMenu();
461 m_Hud.ShowHudUI(
false);
466 if (
GetUApi().GetInputByID(UAUIGesturesOpen).LocalRelease() ||
GetUApi().GetInputByID(UAUIGesturesOpen).LocalValue() == 0 )
471 GesturesMenu.CloseMenu();
472 m_Hud.ShowHudUI(
true );
494 if (
GetUApi().GetInputByID(UAGear).LocalPress())
507 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress() && menu && inventory && menu == inventory)
512 #ifndef PLATFORM_CONSOLE
526 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalHold())
531 m_Hud.ShowHudPlayer(
m_Hud.GetHudVisibility().IsContextFlagActive(EHudContextFlags.HUD_HIDE));
535 if (
GetUApi().GetInputByID(UAUIQuickbarToggle).LocalRelease())
539 m_Hud.ShowQuickbarPlayer(
m_Hud.GetHudVisibility().IsContextFlagActive(EHudContextFlags.QUICKBAR_HIDE));
544 if (
GetUApi().GetInputByID(UAZeroingUp).LocalPress() ||
GetUApi().GetInputByID(UAZeroingDown).LocalPress() ||
GetUApi().GetInputByID(UAToggleWeapons).LocalPress())
546 m_Hud.ZeroingKeyPress();
553 if (
GetUApi().GetInputByID(UANextActionCategory).LocalPress())
557 else if (
GetUApi().GetInputByID(UAPrevActionCategory).LocalPress())
561 else if (
GetUApi().GetInputByID(UANextAction).LocalPress())
565 else if (
GetUApi().GetInputByID(UAPrevAction).LocalPress())
576 if (menu == NULL && playerPB.IsPlacingLocal() && playerPB.GetHologramLocal().GetParentEntity().PlacementCanBeRotated())
578 if (
GetUApi().GetInputByID(UANextAction).LocalRelease())
580 playerPB.GetHologramLocal().SubtractProjectionRotation(15);
583 if (
GetUApi().GetInputByID(UAPrevAction).LocalRelease())
585 playerPB.GetHologramLocal().AddProjectionRotation(15);
604 int life_state = player.GetPlayerState();
611 for (i = 0; i < 5; i++)
618 for (i = 0; i < 6; i++)
630 if (
GetUApi().GetInputByID(UAGear).LocalPress())
637 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
663 if (!
g_Game.GetUIManager().ScreenFadeVisible() && (!menu_xb || !menu_xb.IsOnlineOpen() && !menu_xb.FeedbackDialogVisible()))
665 if (
GetUApi().GetInputByID(UAUIMenu).LocalPress())
669 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
674 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
676 if (menu_xb && menu_xb.IsOnlineOpen())
678 menu_xb.CloseOnline();
683 else if (
GetUApi().GetInputByID(UAUIMenu).LocalPress())
696 if (!
GetGame().IsMultiplayer())
708 super.OnUpdate( timeslice );
713 super.OnKeyPress(key);
719 super.OnKeyRelease(key);
724 super.OnEvent(eventTypeId, params);
743 chatMenu.UpdateChannel();
753 case WindowsResizeEventTypeID:
755 m_Hud.OnResizeScreen();
761 PluginDeveloper plugin_developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper) );
762 plugin_developer.OnSetFreeCameraEvent(
PlayerBase.Cast( player ), set_free_camera_event_params.param1 );
766 if (networkInputBufferParams)
778 if (item.IsInherited(ItemBook))
783 bookMenu.ReadBook(item);
790 override void SetInputSuppression(
bool state)
792 m_SuppressNextFrame = state;
795 override bool GetInputSuppression()
797 return m_SuppressNextFrame;
804 super.PlayerControlEnable(bForceSupress);
853 super.PlayerControlDisable(mode);
886 Debug.
Log(
"Unknown controls disable mode");
896 ItemBase item = player.GetItemInHands();
897 if (item && item.IsWeapon())
898 player.RequestResetADSSync();
905 super.RemoveActiveInputExcludes(excludes,bForceSupress);
907 if (excludes.Count() != 0)
909 bool changed =
false;
913 foreach (
string excl : excludes)
941 case EInputRestrictors.INVENTORY:
946 case EInputRestrictors.MAP:
963 super.AddActiveInputExcludes(excludes);
965 if (excludes.Count() != 0)
967 bool changed =
false;
973 foreach (
string excl : excludes)
1000 case EInputRestrictors.INVENTORY:
1006 ItemBase item = player.GetItemInHands();
1007 if (item && item.IsWeapon())
1008 player.RequestResetADSSync();
1012 case EInputRestrictors.MAP:
1058 for (
int i = 0; i < count; i++)
1076 bool active =
false;
1129 #ifdef PLATFORM_CONSOLE
1130 IngameHud hud = IngameHud.Cast(
GetHud() );
1135 hud.GetHudPanelWidget().SetPos( 0, -0.055 );
1139 hud.GetHudPanelWidget().SetPos( 0, 0 );
1218 GetHud().ShowVehicleInfo();
1224 GetHud().HideVehicleInfo();
1263 if (
g_Game.IsClient() &&
g_Game.GetGameState() != DayZGameState.IN_GAME )
1278 if (!menu || !menu.IsVisible())
1294 int menu_id = menu.GetID();
1328 if (menu && menu.GetID() !=
MENU_LOGOUT && menu.IsClosing())
1333 if (!player || player.IsDamageDestroyed())
1436 m_DebugMonitor.SetPosition(MiscGameplayFunctions.TruncateVec(player.GetPosition(),1));
1441 float minFPS, maxFPS, avgFPS;
1469 return hold_action_time;
1481#ifdef DIAG_DEVELOPER
1487 bool bState = diagmenu.m_HairHidingStateMap.Get(i);
1488 string selectionState;
1490 selectionState =
"Hidden";
1492 selectionState =
"Shown";
1493 string selectionName = diagmenu.m_HairSelectionArray.Get(i);
1497 DbgUI.
Text(
"Current Hair Selection:" + selectionName);
1525 if ( voiceKey <= level )
1527 voiceWidget.SetAlpha(1.0);
1528 voiceWidget.Show(
true);
1531 timer.FadeOut(voiceWidget, 3.0);
1534 voiceWidget.Show(
false);
1590 voiceWidget.Show(
false);
1601 m_Note = NoteMenu.Cast(menu);
1606 #ifdef DIAG_DEVELOPER
1636 return m_ActiveRefresherLocations;
1699 amb = player.GetActionManager();
1703 action = amb.GetRunningAction();
1704 if (action && amb.GetActionState(action) !=
UA_NONE)
1706 amb.RequestInterruptAction();
1733 amb = player.GetActionManager();
1737 action = amb.GetRunningAction();
1738 if (action && amb.GetActionState(action) !=
UA_NONE)
1740 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.
static void CreateZones()
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.