-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add manual reticle night switch keybind (#1141)
* add manual reticle night switch keybind * add optics reticleSafezoneSize config entry (#1142) * optics reticleSafezoneSize config entry * optics hidePeripheralVision config entry (#1143)
- Loading branch information
Showing
10 changed files
with
118 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[ | ||
ELSTRING(common,WeaponsCategory), | ||
QGVAR(ManualReticleNightSwitch), | ||
[LSTRING(manual_reticle_switch), LSTRING(manual_reticle_switch_tooltip)], | ||
{ | ||
if (GVAR(manualReticleNightSwitch)) then { | ||
GVAR(useReticleNight) = !GVAR(useReticleNight); | ||
|
||
// play sound | ||
private _unit = call CBA_fnc_currentUnit; | ||
private _position = _unit modelToWorldVisualWorld (_unit selectionPosition "RightHand"); | ||
|
||
SOUND_RETICLE_SWITCH params ["_filename", ["_volume", 1], ["_soundPitch", 1], ["_distance", 0]]; | ||
|
||
// add file extension .wss as default | ||
if !(toLower (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then { | ||
_filename = format ["%1.wss", _filename]; | ||
}; | ||
|
||
playSound3D [_filename, objNull, false, _position, _volume, _soundPitch, _distance]; | ||
|
||
true | ||
} else {false}; | ||
}, | ||
{}, | ||
[DIK_NUMPAD0, [false, false, false]] | ||
] call CBA_fnc_addKeybind; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters