mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Variable for repeated locality check
This commit is contained in:
parent
34e7a70fdf
commit
50da8341cd
@ -27,7 +27,9 @@ if (GVAR(simplifiedZeroing)) exitWith {
|
|||||||
((_adjustment select _weaponIndex) select 0)
|
((_adjustment select _weaponIndex) select 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
private _optic = if (_unit == ACE_Player) then {
|
private _local = (_unit == ACE_Player);
|
||||||
|
|
||||||
|
private _optic = if (_local) then {
|
||||||
GVAR(Optics) select _weaponIndex;
|
GVAR(Optics) select _weaponIndex;
|
||||||
} else {
|
} else {
|
||||||
([_unit] call FUNC(getOptics)) select _weaponIndex;
|
([_unit] call FUNC(getOptics)) select _weaponIndex;
|
||||||
@ -35,7 +37,7 @@ private _optic = if (_unit == ACE_Player) then {
|
|||||||
private _opticConfig = if (_optic != "") then {
|
private _opticConfig = if (_optic != "") then {
|
||||||
(configFile >> "CfgWeapons" >> _optic)
|
(configFile >> "CfgWeapons" >> _optic)
|
||||||
} else {
|
} else {
|
||||||
if (_unit == ACE_Player) then {
|
if (_local) then {
|
||||||
(configFile >> "CfgWeapons" >> (GVAR(Guns) select _weaponIndex))
|
(configFile >> "CfgWeapons" >> (GVAR(Guns) select _weaponIndex))
|
||||||
} else {
|
} else {
|
||||||
private _gun = switch (_weaponIndex) do {
|
private _gun = switch (_weaponIndex) do {
|
||||||
|
Loading…
Reference in New Issue
Block a user