mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Safe Mode - Fix disabled laser on safety switch (#6639)
* Fix disabled laser on safety switch * Add workaround for switching to primary weapon * Add UGL check
This commit is contained in:
parent
842f9e5d3b
commit
2ff614c3a2
@ -60,7 +60,19 @@ if (_unit getVariable [QGVAR(actionID), -1] == -1) then {
|
||||
};
|
||||
|
||||
if (_muzzle isEqualType "") then {
|
||||
private _laserEnabled = _unit isIRLaserOn _weapon || {_unit isFlashlightOn _weapon};
|
||||
|
||||
_unit selectWeapon _muzzle;
|
||||
|
||||
if (
|
||||
_laserEnabled
|
||||
&& {
|
||||
_muzzle == primaryWeapon _unit // prevent UGL switch
|
||||
|| {"" == primaryWeapon _unit} // Arma switches to primary weapon if exists
|
||||
}
|
||||
) then {
|
||||
{_unit action [_x, _unit]} forEach ["GunLightOn", "IRLaserOn"];
|
||||
};
|
||||
};
|
||||
|
||||
// play fire mode selector sound
|
||||
|
@ -30,8 +30,20 @@ if (_safedWeapons isEqualTo []) then {
|
||||
_unit setVariable [QGVAR(actionID), -1];
|
||||
};
|
||||
|
||||
private _laserEnabled = _unit isIRLaserOn _weapon || {_unit isFlashlightOn _weapon};
|
||||
|
||||
_unit selectWeapon _muzzle;
|
||||
|
||||
if (
|
||||
_laserEnabled
|
||||
&& {
|
||||
_muzzle == primaryWeapon _unit // prevent UGL switch
|
||||
|| {"" == primaryWeapon _unit} // Arma switches to primary weapon if exists
|
||||
}
|
||||
) then {
|
||||
{_unit action [_x, _unit]} forEach ["GunLightOn", "IRLaserOn"];
|
||||
};
|
||||
|
||||
if (inputAction "nextWeapon" > 0) then {
|
||||
// switch to the last mode to roll over to first after the default nextWeapon action
|
||||
// get weapon modes
|
||||
|
Loading…
Reference in New Issue
Block a user