mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
scopes: partial fix
This commit is contained in:
parent
63af6892eb
commit
112c9f319f
@ -1,10 +1,10 @@
|
|||||||
class RscTitles {
|
class RscTitles {
|
||||||
class ACE_Scope_Zeroing {
|
class ACE_Scopes_Zeroing {
|
||||||
idd = -1;
|
idd = -1;
|
||||||
movingEnable = 0;
|
movingEnable = 0;
|
||||||
enableSimulation = 1;
|
enableSimulation = 1;
|
||||||
enableDisplay = 1;
|
enableDisplay = 1;
|
||||||
onLoad = QUOTE(_this spawn compile preprocessFileLineNumbers 'z\ace\scopes\scripts\zeroingOnLoad.sqf'; uiNamespace setVariable [ARR_2('ACE_Scopes_Debug', _this)];);
|
onLoad = QUOTE(_this spawn compile preprocessFileLineNumbers QUOTE(QUOTE(PATHTOF(scripts\zeroingOnLoad.sqf))); uiNamespace setVariable [ARR_2('ACE_Scopes_Debug', _this)];);
|
||||||
duration = 1e+011;
|
duration = 1e+011;
|
||||||
fadein = 0;
|
fadein = 0;
|
||||||
fadeout = 0;
|
fadeout = 0;
|
||||||
|
@ -96,7 +96,7 @@ if !(hasInterface) exitWith {};
|
|||||||
] call cba_fnc_registerKeybind;
|
] call cba_fnc_registerKeybind;
|
||||||
|
|
||||||
["ACE3",
|
["ACE3",
|
||||||
localize "adjustScopeRight",
|
localize "STR_ACE_Scopes_AdjustRight",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
_exceptions = [];
|
_exceptions = [];
|
||||||
|
@ -29,7 +29,7 @@ if (isNil QGVAR(Adjustment)) then {
|
|||||||
GVAR(Adjustment) = [[0,0], [0,0], [0,0]];
|
GVAR(Adjustment) = [[0,0], [0,0], [0,0]];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isNil "AGM_Scopes_Optics") then {
|
if (isNil QGVAR(Optics)) then {
|
||||||
GVAR(Optics) = ["", "", ""];
|
GVAR(Optics) = ["", "", ""];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
1
addons/scopes/scripts/script_component.hpp
Normal file
1
addons/scopes/scripts/script_component.hpp
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "\z\ace\addons\scopes\script_component.hpp"
|
@ -1,7 +1,9 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
_display = _this select 0;
|
_display = _this select 0;
|
||||||
uiNamespace setVariable ["ACE_Scopes_ZeroingDisplay", _display];
|
uiNamespace setVariable [QGVAR(ZeroingDisplay, _display];
|
||||||
_vertical = _display displayCtrl 925002;
|
_vertical = _display displayCtrl 925002;
|
||||||
_horizontal = _display displayCtrl 925003;
|
_horizontal = _display displayCtrl 925003;
|
||||||
|
|
||||||
@ -11,8 +13,8 @@ _weapons = [
|
|||||||
handgunWeapon player
|
handgunWeapon player
|
||||||
];
|
];
|
||||||
|
|
||||||
if ((currentWeapon player) in _weapons) then {
|
if ((currentWeapon ACE_player) in _weapons) then {
|
||||||
_zeroing = ACE_Scopes_Adjustment select (_weapons find (currentWeapon player));
|
_zeroing = GVAR(Adjustment) select (_weapons find (currentWeapon ACE_player));
|
||||||
_horizontal ctrlSetText (str (_zeroing select 0));
|
_horizontal ctrlSetText (str (_zeroing select 0));
|
||||||
_vertical ctrlSetText (str (_zeroing select 1));
|
_vertical ctrlSetText (str (_zeroing select 1));
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user