Update showHud func for 1.62 (squad radar)

This commit is contained in:
PabstMirror 2016-07-03 12:17:42 -05:00
parent f2359cb243
commit 82f63b5935
6 changed files with 13 additions and 6 deletions

View File

@ -21,7 +21,7 @@ params ["_newUnit","_oldUnit"];
//set showHUD based on new unit status:
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
TRACE_1("Player Change (showHUD false)",_newUnit);
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
["captive", [false, false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
} else {
TRACE_1("Player Change (showHUD true)",_newUnit);
["captive", []] call EFUNC(common,showHud); //same as showHud true;

View File

@ -19,7 +19,7 @@
if ((ACE_player getVariable [QGVAR(isHandcuffed), false]) || {ACE_player getVariable [QGVAR(isSurrendering), false]}) then {
TRACE_1("Player Change (showHUD false)",ACE_player);
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
["captive", [false, false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
} else {
TRACE_1("Player Change (showHUD true)",ACE_player);
["captive", []] call EFUNC(common,showHud); //same as showHud true;

View File

@ -50,7 +50,7 @@ if (_state) then {
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
if (_unit == ACE_player) then {
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
["captive", [false, false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
};
// fix anim on mission start (should work on dedicated servers)

View File

@ -47,7 +47,7 @@ if (_state) then {
[_unit, "setCaptive", QGVAR(Surrendered), true] call EFUNC(common,statusEffect_set);
if (_unit == ACE_player) then {
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
["captive", [false, false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
};
[_unit] call EFUNC(common,fixLoweredRifleAnimation);

View File

@ -15,6 +15,7 @@
* - menu: Boolean - show commanding menu (hides HC related menus)
* - group: Boolean - show group info bar (hides squad leader info bar)
* - cursors: Boolean - show HUD weapon cursors (connected with scripted HUD)
* - squadRadar: Boolean - show HUD squad radar (since 1.62)
*
* Return Value:
* Resulting ShowHud Array <ARRAY>
@ -29,7 +30,12 @@
if (!hasInterface) exitWith {[-1]};
params [["_reason", "", [""]], ["_mask", [], [[]], [0,8]]];
params [["_reason", "", [""]], ["_mask", [], [[]], [0,8,9]]];
if ((count _mask) == 8) then {
ACE_LOGWARNING_1("ace_common_fnc_showHud - mask now takes 9 arguements in 1.62 [called with %1]",_this);
_mask pushBack true;
};
if (isArray (missionConfigFile >> "showHUD")) then {
//(showHud = 0;) is fine - the array is the problem
@ -50,7 +56,7 @@ if (_reason != "") then {
GVAR(showHudHash) params ["_reasons", "_masks"];
private _resultMask = [];
for "_index" from 0 to 7 do {
for "_index" from 0 to 8 do {
private _set = true; //Default to true
{
if (!(_x select _index)) exitWith {

View File

@ -31,5 +31,6 @@ if (isArray (missionConfigFile >> "showHUD")) exitWith {
true,
GVAR(commandMenu),
GVAR(groupBar),
true,
true
]] call EFUNC(common,showHud);