From db83f1a59bf76249111ba05580a03952f6a21f26 Mon Sep 17 00:00:00 2001 From: Pi123263 Date: Mon, 17 Feb 2020 19:58:39 +0100 Subject: [PATCH] Add ace detection and disable nametags when player is unconscious -Added detection for the ace medical config file -Added an if clause that detects if the player is ace uncon and stops the name tag displaying if he is Relevant Github issue: https://github.com/Quailsnap/WHA-Nametags/issues/76 --- .../wha/nametags/functions/fn_onEachFrame.sqf | 8 ++++++++ .../wha/nametags/include/wha_nametags_checkMods.sqf | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wha_nametags.Stratis/wha/nametags/functions/fn_onEachFrame.sqf b/wha_nametags.Stratis/wha/nametags/functions/fn_onEachFrame.sqf index 6f812c3..9c0da4f 100644 --- a/wha_nametags.Stratis/wha/nametags/functions/fn_onEachFrame.sqf +++ b/wha_nametags.Stratis/wha/nametags/functions/fn_onEachFrame.sqf @@ -34,6 +34,14 @@ private _toDraw =+ WHA_NAMETAGS_CACHE; //if (_time > WHA_NAMETAG_CACHE_TIME + 0.5) then //{} +//------------------------------------------------------------------------------------ +// Check if player is unconscious. +//------------------------------------------------------------------------------------ + +if (WHA_NAMETAGS_MOD_ACE && _player getVariable ["ACE_isUnconscious", false]) +exitWith {}; + + //------------------------------------------------------------------------------------ // Collect player cursor target for drawing tags. //------------------------------------------------------------------------------------ diff --git a/wha_nametags.Stratis/wha/nametags/include/wha_nametags_checkMods.sqf b/wha_nametags.Stratis/wha/nametags/include/wha_nametags_checkMods.sqf index 5f690e3..59cab92 100644 --- a/wha_nametags.Stratis/wha/nametags/include/wha_nametags_checkMods.sqf +++ b/wha_nametags.Stratis/wha/nametags/include/wha_nametags_checkMods.sqf @@ -11,7 +11,7 @@ //------------------------------------------------------------------------------------ // ACE -// TBD, May integrate some ACE stuff (dead nametags) later. +WHA_NAMETAGS_MOD_ACE = (isClass(configfile >> "CfgPatches" >> "ace_medical")); // TFAR WHA_NAMETAGS_MOD_TFAR = (isClass (configFile >> "CfgPatches" >> "task_force_radio"));