diff --git a/addons/laser/XEH_pre_init.sqf b/addons/laser/XEH_pre_init.sqf index 242300791f..e160a533f2 100644 --- a/addons/laser/XEH_pre_init.sqf +++ b/addons/laser/XEH_pre_init.sqf @@ -23,7 +23,7 @@ PREP(laser_init); PREP(vanillaLaserSeekerHandler); PREP(laserTargetPFH); -ACE_LASERS = []; +GVAR(VanillaLasers) = []; // Laser default variables ACE_DEFAULT_LASER_CODE = 1001; diff --git a/addons/laser/functions/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf index 15d0fa03d0..d73d9f070a 100644 --- a/addons/laser/functions/fnc_laserTargetPFH.sqf +++ b/addons/laser/functions/fnc_laserTargetPFH.sqf @@ -1,4 +1,4 @@ -#define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" TRACE_1("enter", _this); @@ -11,7 +11,7 @@ _uuid = _args select 2; if(isNull _laserTarget || !alive _shooter) exitWith { [(_this select 1)] call cba_fnc_removePerFrameHandler; - REM(ACE_LASERS, _laserTarget); + REM(GVAR(VanillaLasers), _laserTarget); // Remove laseron [_uuid] call FUNC(laserOff); diff --git a/addons/laser/functions/fnc_laser_init.sqf b/addons/laser/functions/fnc_laser_init.sqf index 7c39c9be87..378ee38407 100644 --- a/addons/laser/functions/fnc_laser_init.sqf +++ b/addons/laser/functions/fnc_laser_init.sqf @@ -1,4 +1,4 @@ -#define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" TRACE_1("enter", _this); @@ -7,7 +7,7 @@ PARAMS_1(_laserTarget); // Add the target to the global targets array // Everyone tracks them // Add the laser localized to the laser array, and give it the default localized code -PUSH(ACE_LASERS, _laserTarget); +PUSH(GVAR(VanillaLasers), _laserTarget); // Check the vehicle, otherwise use the default _laserTarget setVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE, false]; @@ -15,7 +15,7 @@ _laserTarget setVariable [QGVAR(beamSpread), ACE_DEFAULT_LASER_BEAMSPREAD, false _laserTarget setVariable [QGVAR(waveLength), ACE_DEFAULT_LASER_WAVELENGTH, false]; // Clean the lasers of any null objects while we are here -REM(ACE_LASERS, objNull); +REM(GVAR(VanillaLasers), objNull); if(!(local _laserTarget)) exitWith { }; @@ -25,7 +25,7 @@ if(!isDedicated) then { _uuid = [(vehicle ACE_player), ACE_player, QFUNC(vanillaLaserSeekerHandler), ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_CODE, ACE_DEFAULT_LASER_BEAMSPREAD] call FUNC(laserOn); _laserTarget setVariable [QGVAR(uuid), _uuid, false]; - [FUNC(laserTargetPFH), 1, [_laserTarget, ACE_player, _uuid]] call cba_fnc_addPerFrameHandler; + [FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player, _uuid]] call cba_fnc_addPerFrameHandler; } else { // server side ownership of laser _laserTarget setVariable [QGVAR(owner), nil, true];