scopes: partial fix

This commit is contained in:
Nicolás Badano 2015-01-18 18:34:45 -03:00
parent 63af6892eb
commit 112c9f319f
6 changed files with 10 additions and 7 deletions

View File

@ -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;

View File

@ -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 = [];

View File

@ -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) = ["", "", ""];
}; };

View File

@ -0,0 +1 @@
#include "\z\ace\addons\scopes\script_component.hpp"

View File

@ -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));
}; };