Goggles - Fix APR and Regulator overlays being flipped (#9009)

This commit is contained in:
Whigital 2022-09-04 23:37:48 +02:00 committed by GitHub
parent dc3f6c6634
commit 66801bb0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -235,12 +235,15 @@ class CfgGlasses {
ACE_OverlayCracked = ""; ACE_OverlayCracked = "";
ACE_Resistance = 2; ACE_Resistance = 2;
ACE_Protection = 1; ACE_Protection = 1;
ACE_Overlay_Angle = 180;
}; };
class G_AirPurifyingRespirator_02_base_F: G_AirPurifyingRespirator_01_base_F { class G_AirPurifyingRespirator_02_base_F: G_AirPurifyingRespirator_01_base_F {
ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_APR_02_CA.paa"; ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_APR_02_CA.paa";
}; };
class G_RegulatorMask_base_F: None { class G_RegulatorMask_base_F: None {
ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_regulator_ca.paa"; ACE_Overlay = "a3\ui_f_enoch\data\objects\data\optics_regulator_ca.paa";
ACE_OverlayCracked = "";
ACE_Overlay_Angle = 180;
}; };
}; };

View File

@ -44,10 +44,16 @@ if (_postProcessTintAmount != 0 && {GVAR(UsePP)} && GVAR(effects) in [1, 2]) the
}; };
private _imagePath = getText (_config >> ["ACE_Overlay", "ACE_OverlayCracked"] select GETBROKEN); private _imagePath = getText (_config >> ["ACE_Overlay", "ACE_OverlayCracked"] select GETBROKEN);
private _angle = getNumber (_config >> "ACE_Overlay_Angle");
if (_imagePath != "") then { if (_imagePath != "") then {
GVAR(GogglesLayer) cutRsc ["RscACE_Goggles", "PLAIN", 1, false]; GVAR(GogglesLayer) cutRsc ["RscACE_Goggles", "PLAIN", 1, false];
(GLASSDISPLAY displayCtrl 10650) ctrlSetText _imagePath; private _overlay = (GLASSDISPLAY displayCtrl 10650);
_overlay ctrlSetText _imagePath;
if ((_angle != 0) && {((ctrlAngle _overlay) # 0) != _angle}) then {
_overlay ctrlSetAngle [_angle, 0.5, 0.5, true];
};
}; };
if (GVAR(effects) in [2, 3]) then { if (GVAR(effects) in [2, 3]) then {