Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scopes - No Zeroing from Secondary Sights #10220

Merged
merged 15 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions addons/scopes/functions/fnc_applyScopeAdjustment.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ if (cameraView == "GUNNER") then {
_yaw = _yaw + _windageDifference;
[_unit, _pitch, _bank, _yaw] call EFUNC(common,setPitchBankYaw);
};

if (GVAR(inScopeAdjustment)) then {
[] call FUNC(showZeroing);
};
} else {
[] call FUNC(showZeroing);
};
Expand Down
5 changes: 4 additions & 1 deletion addons/scopes/functions/fnc_getCurrentZeroRange.sqf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self to clean this up eventually (save CfgWeapons lookup, parentheses)

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ private _opticConfig = if (_optic != "") then {
};

private _zeroRange = currentZeroing _unit;
if (GVAR(overwriteZeroRange) && {GVAR(canAdjustElevation) select _weaponIndex}) then {
if (
(GVAR(canAdjustElevation) select _weaponIndex) &&
{GVAR(overwriteZeroRange) || {getNumber (_opticConfig >> "ItemInfo" >> "OpticsModes" >> (_unit getOpticsMode _weaponIndex) >> "opticsZoomMax") > 0.2}}
mrschick marked this conversation as resolved.
Show resolved Hide resolved
) then {
_zeroRange = GVAR(defaultZeroRange);
};
if (isNumber (_opticConfig >> "ACE_ScopeZeroRange")) then {
Expand Down
8 changes: 8 additions & 0 deletions addons/scopes/initSettings.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,11 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)];
false,
1
] call CBA_fnc_addSetting;

[
QGVAR(inScopeAdjustment), "CHECKBOX",
LSTRING(inScopeAdjustment_displayName),
_category,
false,
0
] call CBA_fnc_addSetting;
5 changes: 5 additions & 0 deletions addons/scopes/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@
<Czech>Replikuje systém naměřování puškohledů ze základní hry.</Czech>
<Spanish>Replica en los visores el sistema de homogeneizado de vanilla</Spanish>
</Key>
<Key ID="STR_ACE_Scopes_inScopeAdjustment_displayName">
<English>Show adjustment UI in scope</English>
<German>Zeige Absehenverstellungs-UI im Zielfernrohr</German>
<Italian>Mostra UI delle manopole nel mirino</Italian>
</Key>
<Key ID="STR_ACE_Scopes_AdjustUpMinor">
<English>Minor adjustment up</English>
<German>Kleine Korrektur hoch</German>
Expand Down
Loading