mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Integration of lasers for vanilla laser designation as well. Remove debug.
This commit is contained in:
parent
2317a3c988
commit
509b5e1a05
@ -23,7 +23,7 @@ PREP(laser_init);
|
|||||||
PREP(vanillaLaserSeekerHandler);
|
PREP(vanillaLaserSeekerHandler);
|
||||||
PREP(laserTargetPFH);
|
PREP(laserTargetPFH);
|
||||||
|
|
||||||
ACE_LASERS = [];
|
GVAR(VanillaLasers) = [];
|
||||||
|
|
||||||
// Laser default variables
|
// Laser default variables
|
||||||
ACE_DEFAULT_LASER_CODE = 1001;
|
ACE_DEFAULT_LASER_CODE = 1001;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define DEBUG_MODE_FULL
|
//#define DEBUG_MODE_FULL
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
TRACE_1("enter", _this);
|
TRACE_1("enter", _this);
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ _uuid = _args select 2;
|
|||||||
|
|
||||||
if(isNull _laserTarget || !alive _shooter) exitWith {
|
if(isNull _laserTarget || !alive _shooter) exitWith {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
REM(ACE_LASERS, _laserTarget);
|
REM(GVAR(VanillaLasers), _laserTarget);
|
||||||
|
|
||||||
// Remove laseron
|
// Remove laseron
|
||||||
[_uuid] call FUNC(laserOff);
|
[_uuid] call FUNC(laserOff);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define DEBUG_MODE_FULL
|
//#define DEBUG_MODE_FULL
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
TRACE_1("enter", _this);
|
TRACE_1("enter", _this);
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ PARAMS_1(_laserTarget);
|
|||||||
// Add the target to the global targets array
|
// Add the target to the global targets array
|
||||||
// Everyone tracks them
|
// Everyone tracks them
|
||||||
// Add the laser localized to the laser array, and give it the default localized code
|
// 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
|
// Check the vehicle, otherwise use the default
|
||||||
_laserTarget setVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE, false];
|
_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];
|
_laserTarget setVariable [QGVAR(waveLength), ACE_DEFAULT_LASER_WAVELENGTH, false];
|
||||||
|
|
||||||
// Clean the lasers of any null objects while we are here
|
// Clean the lasers of any null objects while we are here
|
||||||
REM(ACE_LASERS, objNull);
|
REM(GVAR(VanillaLasers), objNull);
|
||||||
|
|
||||||
if(!(local _laserTarget)) exitWith { };
|
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);
|
_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];
|
_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 {
|
} else {
|
||||||
// server side ownership of laser
|
// server side ownership of laser
|
||||||
_laserTarget setVariable [QGVAR(owner), nil, true];
|
_laserTarget setVariable [QGVAR(owner), nil, true];
|
||||||
|
Loading…
Reference in New Issue
Block a user