fix errors, but still no overlay

and lots of spawns
This commit is contained in:
bux578 2015-01-18 08:13:37 +01:00
parent 68b56d9161
commit a1c167844d
6 changed files with 30 additions and 27 deletions

View File

@ -13,7 +13,7 @@ class Extended_PostInit_EventHandlers {
class Extended_Fired_EventHandlers {
class CAManBase {
class ADDON {
clientFired = QUOTE(if (_this select 0 == ACE_player) then { _this call FUNC(firedEH) };);
clientFired = QUOTE(if (_this select 0 == ACE_player) then { _this call FUNC(firedEH);};);
};
};
};
@ -21,7 +21,7 @@ class Extended_Fired_EventHandlers {
class Extended_Take_EventHandlers {
class CAManBase {
class ADDON {
clientTake = QUOTE(if (_this select 0 == ACE_player) then{ _this call FUNC(inventoryCheck) };);
clientTake = QUOTE(if (_this select 0 == ACE_player) then{ _this call FUNC(inventoryCheck);};);
};
};
};
@ -29,7 +29,7 @@ class Extended_Take_EventHandlers {
class Extended_Put_EventHandlers {
class CAManBase {
class ADDON {
clientPut = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(inventoryCheck)};);
clientPut = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(inventoryCheck);};);
};
};
};
@ -37,7 +37,7 @@ class Extended_Put_EventHandlers {
class Extended_InitPost_EventHandlers {
class CAManBase {
class ADDON {
init = QUOTE(if (_this select 0 == call EFUNC(common,player)) then{ _this call FUNC(inventoryCheck) };);
init = QUOTE(if (_this select 0 == call EFUNC(common,player)) then{ _this call FUNC(inventoryCheck);};);
};
};
};
@ -45,7 +45,7 @@ class Extended_InitPost_EventHandlers {
class Extended_Respawn_EventHandlers {
class CAManBase {
class ADDON {
respawn = QUOTE(if (_this select 0 == call EFUNC(common, player)) then{ _this call FUNC(inventoryCheck) };);
respawn = QUOTE(if (_this select 0 == call EFUNC(common,player)) then{ _this call FUNC(inventoryCheck);};);
};
};
};

View File

@ -4,7 +4,7 @@ class RscTitles {
movingEnable = 0;
enableSimulation = 1;
enableDisplay = 1;
onLoad = QUOTE(_this spawn COMPILE_FILE(PATHTOF(scripts\zeroingOnLoad.sqf)); uiNamespace setVariable[QGVAR(Debug), _this];);
onLoad = QUOTE(_this spawn compile preprocessFileLineNumbers 'z\ace\scopes\scripts\zeroingOnLoad.sqf'; uiNamespace setVariable [ARR_2('ACE_Scopes_Debug', _this)];);
duration = 1e+011;
fadein = 0;
fadeout = 0;
@ -12,7 +12,7 @@ class RscTitles {
class RscPicture;
class RscText;
class controls {
class ACE_Scope_Zeroing_BG : RscPicture {
class ACE_Scopes_Zeroing_BG : RscPicture {
idc = 925001;
type = 0;
text = PATHTOF(UI\scopes_bg.paa);
@ -29,7 +29,7 @@ class RscTitles {
w = 0.4 * safezoneW;
h = 0.3 * safezoneH;
};
class ACE_Scope_Zeroing_Vertical : RscText {
class ACE_Scopes_Zeroing_Vertical : RscText {
idc = 925002;
type = 0;
style = 2;
@ -46,7 +46,7 @@ class RscTitles {
w = 0.04 * safezoneW;
h = 0.025 * safezoneH;
};
class ACE_Scope_Zeroing_Horizontal : RscText {
class ACE_Scopes_Zeroing_Horizontal : RscText {
idc = 925003;
type = 0;
style = 0;
@ -70,6 +70,7 @@ class RscTitles {
class RscInGameUI {
class RscUnitInfo;
class RscWeaponZeroing : RscUnitInfo {
onLoad = QUOTE(["onLoad", _this, "RscUnitInfo", "IGUI"] call COMPILE_FILE(PATHTOF(A3\ui_f\scripts\initDisplay.sqf)); uiNamespace setVariable["ACE_dlgWeaponZeroing", _this select 0];);
onLoad = QUOTE([ARR_4('onLoad',_this,'RscUnitInfo','IGUI')] call compile preprocessfilelinenumbers 'A3\ui_f\scripts\initDisplay.sqf'; uiNamespace setVariable [ARR_2('ACE_dlgWeaponZeroing', _this select 0)]; );
//onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable ['ACE_dlgWeaponZeroing', _this select 0];";
};
};

View File

@ -9,6 +9,9 @@
* Return Value:
* None
*/
#include "script_component.hpp"
GVAR(fadeScript) = scriptNull;
// show overlay after changing weapon/optic

View File

@ -21,8 +21,8 @@ class CfgPatches {
class ACE_Default_Keys {
class adjustScopeUp {
displayName = "$STR_ACE_Scopes_AdjustUp";
condition = QUOTE([_player] call FUNC(inventoryCheck); [_player, 0, 0.1] call FUNC(canAdjustScope));
statement = QUOTE([_player, 0, 0.1] call FUNC(adjustScope));
condition = QUOTE([_player] call FUNC(inventoryCheck); [ARR_3(_player, 0, 0.1)] call FUNC(canAdjustScope););
statement = QUOTE([ARR_3(_player, 0, 0.1)] call FUNC(adjustScope););
allowHolding = 1;
key = 201;
shift = 0;
@ -31,24 +31,23 @@ class ACE_Default_Keys {
};
class adjustScopeDown: adjustScopeUp {
displayName = "$STR_ACE_Scopes_AdjustDown";
condition = QUOTE([_player] call FUNC(inventoryCheck); [_player, 0, -0.1] call FUNC(canAdjustScope));
statement = QUOTE([_player, 0, -0.1] call FUNC(adjustScope));
condition = QUOTE([_player] call FUNC(inventoryCheck); [ARR_3(_player, 0, -0.1)] call FUNC(canAdjustScope););
statement = QUOTE([ARR_3(_player, 0, -0.1)] call FUNC(adjustScope););
key = 209;
};
class adjustScopeLeft: adjustScopeUp {
displayName = "$STR_ACE_Scopes_AdjustLeft";
condition = QUOTE([_player] call FUNC(inventoryCheck); [_player, -0.1, 0] call FUNC(canAdjustScope));
statement = QUOTE([_player, -0.1, 0] call FUNC(adjustScope));
condition = QUOTE([_player] call FUNC(inventoryCheck); [ARR_3(_player, -0.1, 0)] call FUNC(canAdjustScope););
statement = QUOTE([ARR_3(_player, -0.1, 0)] call FUNC(adjustScope););
key = 209;
control = 1;
};
class adjustScopeRight: adjustScopeLeft {
displayName = "$STR_ACE_Scopes_AdjustRight";
condition = QUOTE([_player] call FUNC(inventoryCheck); [_player, 0.1, 0] call FUNC(canAdjustScope));
statement = QUOTE([_player, 0.1, 0] call FUNC(adjustScope));
condition = QUOTE([_player] call FUNC(inventoryCheck); [ARR_3(_player, 0.1, 0)] call FUNC(canAdjustScope););
statement = QUOTE([ARR_3(_player, 0.1, 0)] call FUNC(adjustScope););
key = 201;
};
};
#include "RscTitles.hpp"
#include "RscInGameUI.hpp"

View File

@ -27,7 +27,7 @@ _weapons = [
];
if !(_weaponType in _weapons) exitWith {};
_zeroing = QGVAR(Adjustment) select (_weapons find _weaponType);
_zeroing = GVAR(Adjustment) select (_weapons find _weaponType);
// convert zeroing from mils to degrees
_zeroing = [_zeroing, {_this * 0.05625}] call EFUNC(common,map);

View File

@ -1,18 +1,18 @@
disableSerialization;
_display = _this select 0;
uiNamespace setVariable ["AGM_Scopes_ZeroingDisplay", _display];
uiNamespace setVariable ["ACE_Scopes_ZeroingDisplay", _display];
_vertical = _display displayCtrl 925002;
_horizontal = _display displayCtrl 925003;
_weapons = [
primaryWeapon player,
secondaryWeapon player,
handgunWeapon player
primaryWeapon player,
secondaryWeapon player,
handgunWeapon player
];
if ((currentWeapon player) in _weapons) then {
_zeroing = AGM_Scopes_Adjustment select (_weapons find (currentWeapon player));
_horizontal ctrlSetText (str (_zeroing select 0));
_vertical ctrlSetText (str (_zeroing select 1));
_zeroing = ACE_Scopes_Adjustment select (_weapons find (currentWeapon player));
_horizontal ctrlSetText (str (_zeroing select 0));
_vertical ctrlSetText (str (_zeroing select 1));
};