mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix error in ACE Arsenal stats (#6175)
* Fix the camera on remote units ending after ace arsenal closes * Shorten handleStats, fix error with face, voice, insignia tabs * Remove uneccessary code You saw nothiiiiing.
This commit is contained in:
parent
8ee7c1b132
commit
859b6a16f6
@ -70,7 +70,7 @@ private _statsListLeftPanel = [
|
|||||||
[[]], // GPS 11
|
[[]], // GPS 11
|
||||||
[[]], // Radio 12
|
[[]], // Radio 12
|
||||||
[[]], // Compass 13
|
[[]], // Compass 13
|
||||||
[[]] // Watch 14
|
[[]] // Watch 14
|
||||||
];
|
];
|
||||||
|
|
||||||
private _statsListRightPanel = [
|
private _statsListRightPanel = [
|
||||||
|
@ -157,61 +157,43 @@ if !(isNil "_itemCfg") then {
|
|||||||
|
|
||||||
if (ctrlIDC _control == IDC_leftTabContent) then {
|
if (ctrlIDC _control == IDC_leftTabContent) then {
|
||||||
|
|
||||||
switch (GVAR(currentLeftPanel)) do {
|
if ([IDC_buttonFace, IDC_buttonVoice, IDC_buttonInsigna] find GVAR(currentLeftPanel) > -1) then {
|
||||||
case IDC_buttonPrimaryWeapon: {
|
|
||||||
[0, true] call _handleStatsFnc;
|
[[1, 2, 3, 4, 5]] call _hideUnusedFnc;
|
||||||
};
|
_statsBoxCtrl ctrlSetPosition [
|
||||||
case IDC_buttonHandgun: {
|
(0.5 - WIDTH_TOTAL / 2) + WIDTH_GAP,
|
||||||
[1, true] call _handleStatsFnc;
|
safezoneY + 1.8 * GRID_H,
|
||||||
};
|
47 * GRID_W,
|
||||||
case IDC_buttonSecondaryWeapon: {
|
11 * GRID_H
|
||||||
[2, true] call _handleStatsFnc;
|
];
|
||||||
};
|
_statsBoxCtrl ctrlCommit 0;
|
||||||
case IDC_buttonUniform: {
|
|
||||||
[3, true] call _handleStatsFnc;
|
{
|
||||||
};
|
_x ctrlSetFade 1;
|
||||||
case IDC_buttonVest: {
|
_x ctrlCommit 0;
|
||||||
[4, true] call _handleStatsFnc;
|
} forEach [
|
||||||
};
|
_statsPreviousPageCtrl,
|
||||||
case IDC_buttonBackpack: {
|
_statsNextPageCtrl,
|
||||||
[5, true] call _handleStatsFnc;
|
_statsCurrentPageCtrl
|
||||||
};
|
];
|
||||||
case IDC_buttonHeadgear: {
|
} else {
|
||||||
[6, true] call _handleStatsFnc;
|
[[
|
||||||
};
|
IDC_buttonPrimaryWeapon,
|
||||||
case IDC_buttonGoggles: {
|
IDC_buttonHandgun,
|
||||||
[7, true] call _handleStatsFnc;
|
IDC_buttonSecondaryWeapon,
|
||||||
};
|
IDC_buttonUniform,
|
||||||
case IDC_buttonNVG: {
|
IDC_buttonVest,
|
||||||
[8, true] call _handleStatsFnc;
|
IDC_buttonBackpack,
|
||||||
};
|
IDC_buttonHeadgear,
|
||||||
case IDC_buttonBinoculars: {
|
IDC_buttonGoggles,
|
||||||
[9, true] call _handleStatsFnc;
|
IDC_buttonNVG,
|
||||||
};
|
IDC_buttonBinoculars,
|
||||||
case IDC_buttonMap: {
|
IDC_buttonMap,
|
||||||
[10, true] call _handleStatsFnc;
|
IDC_buttonGPS,
|
||||||
};
|
IDC_buttonRadio,
|
||||||
case IDC_buttonGPS: {
|
IDC_buttonCompass,
|
||||||
[11, true] call _handleStatsFnc;
|
IDC_buttonWatch
|
||||||
};
|
] find GVAR(currentLeftPanel), true] call _handleStatsFnc;
|
||||||
case IDC_buttonRadio: {
|
|
||||||
[12, true] call _handleStatsFnc;
|
|
||||||
};
|
|
||||||
case IDC_buttonCompass: {
|
|
||||||
[13, true] call _handleStatsFnc;
|
|
||||||
};
|
|
||||||
case IDC_buttonWatch: {
|
|
||||||
[14, true] call _handleStatsFnc;
|
|
||||||
};
|
|
||||||
case IDC_buttonFace: {
|
|
||||||
[15, true] call _handleStatsFnc;
|
|
||||||
};
|
|
||||||
case IDC_buttonVoice: {
|
|
||||||
[16, true] call _handleStatsFnc;
|
|
||||||
};
|
|
||||||
case IDC_buttonInsigna: {
|
|
||||||
[17, true] call _handleStatsFnc;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -14,19 +14,11 @@
|
|||||||
|
|
||||||
(_this select 1) params ["", "_exitCode"];
|
(_this select 1) params ["", "_exitCode"];
|
||||||
|
|
||||||
GVAR(camera) cameraEffect ["terminate", "back"];
|
|
||||||
private _cameraData = [getposAtl GVAR(camera), (getposAtl GVAR(camera)) vectorFromTo (getposAtl GVAR(cameraHelper))];
|
private _cameraData = [getposAtl GVAR(camera), (getposAtl GVAR(camera)) vectorFromTo (getposAtl GVAR(cameraHelper))];
|
||||||
|
|
||||||
[QGVAR(displayClosed), []] call CBA_fnc_localEvent;
|
[QGVAR(displayClosed), []] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
removeMissionEventHandler ["draw3D", GVAR(camPosUpdateHandle)];
|
removeMissionEventHandler ["draw3D", GVAR(camPosUpdateHandle)];
|
||||||
|
|
||||||
GVAR(camera) cameraEffect ["terminate","back"];
|
|
||||||
player switchCamera GVAR(cameraView);
|
|
||||||
|
|
||||||
deleteVehicle GVAR(cameraHelper);
|
|
||||||
camDestroy GVAR(camera);
|
|
||||||
|
|
||||||
if (is3DEN) then {
|
if (is3DEN) then {
|
||||||
|
|
||||||
private _centerOriginParent = objectParent GVAR(centerOrigin);
|
private _centerOriginParent = objectParent GVAR(centerOrigin);
|
||||||
@ -62,8 +54,18 @@ if (is3DEN) then {
|
|||||||
case 1: {GVAR(center) selectWeapon secondaryWeapon GVAR(center);};
|
case 1: {GVAR(center) selectWeapon secondaryWeapon GVAR(center);};
|
||||||
case 2: {GVAR(center) selectWeapon handgunWeapon GVAR(center);};
|
case 2: {GVAR(center) selectWeapon handgunWeapon GVAR(center);};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!(isnull curatorCamera) && {ACE_player == player}) then {
|
||||||
|
curatorcamera cameraEffect ["internal","back"];
|
||||||
|
} else {
|
||||||
|
GVAR(camera) cameraEffect ["terminate","back"];
|
||||||
|
ACE_player switchCamera GVAR(cameraView);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
deleteVehicle GVAR(cameraHelper);
|
||||||
|
camDestroy GVAR(camera);
|
||||||
|
|
||||||
if (isMultiplayer) then {
|
if (isMultiplayer) then {
|
||||||
|
|
||||||
[QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP;
|
[QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP;
|
||||||
@ -73,10 +75,6 @@ if (isMultiplayer) then {
|
|||||||
[QGVAR(center) + "_voice", GVAR(center)] call CBA_fnc_removeGlobalEventJIP;
|
[QGVAR(center) + "_voice", GVAR(center)] call CBA_fnc_removeGlobalEventJIP;
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(isnull curatorCamera) then {
|
|
||||||
curatorcamera cameraEffect ["internal","back"];
|
|
||||||
};
|
|
||||||
|
|
||||||
GVAR(camera) = nil;
|
GVAR(camera) = nil;
|
||||||
GVAR(cameraHelper) = nil;
|
GVAR(cameraHelper) = nil;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user