Integration of lasers for vanilla laser designation as well. Remove debug.

This commit is contained in:
jaynus 2015-04-12 14:12:21 -07:00
parent 2317a3c988
commit 509b5e1a05
3 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ PREP(laser_init);
PREP(vanillaLaserSeekerHandler);
PREP(laserTargetPFH);
ACE_LASERS = [];
GVAR(VanillaLasers) = [];
// Laser default variables
ACE_DEFAULT_LASER_CODE = 1001;

View File

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

View File

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