diff --git a/addons/laser/XEH_pre_init.sqf b/addons/laser/XEH_pre_init.sqf index 3fde1769e0..e10067a3cc 100644 --- a/addons/laser/XEH_pre_init.sqf +++ b/addons/laser/XEH_pre_init.sqf @@ -25,6 +25,10 @@ PREP(laser_init); PREP(laserTargetPFH); ACE_LASERS = []; + +// Laser default variables ACE_DEFAULT_LASER_CODE = 1001; +ACE_DEFAULT_LASER_WAVELENGTH = 1550; +ACE_DEFAULT_LASER_BEAMSPREAD = 1; GVAR(laserEmitters) = HASH_CREATE; \ No newline at end of file diff --git a/addons/laser_selfdesignate/CfgUI.hpp b/addons/laser_selfdesignate/CfgUI.hpp deleted file mode 100644 index e8823e04f8..0000000000 --- a/addons/laser_selfdesignate/CfgUI.hpp +++ /dev/null @@ -1,32 +0,0 @@ -class RscPicture; -class RscText; -class RscControlsGroupNoScrollbars; -/* This disables air radar. We need to make this a seperate HUD addon -class RscInGameUI -{ - class RscUnitInfo - { - class CA_Radar: RscControlsGroupNoScrollbars - { - class controls - { - class CA_RadarBackground: RscPicture { - colorText[] = {0,0,0,0}; - text = ""; - }; - class CA_RadarIcon: RscPicture { - colorText[] = {0,0,0,0}; - }; - class CA_Heading: RscText { - colorText[] = {0,0,0,0}; - }; - }; - }; - }; -}; -class CfgInGameUI -{ - -}; - -*/ \ No newline at end of file diff --git a/addons/laser_selfdesignate/CfgVehicles.hpp b/addons/laser_selfdesignate/CfgVehicles.hpp index b29d8a4394..02d8b32b3d 100644 --- a/addons/laser_selfdesignate/CfgVehicles.hpp +++ b/addons/laser_selfdesignate/CfgVehicles.hpp @@ -8,12 +8,6 @@ class CfgVehicles { class Turrets { class MainTurret; }; - - // TODO: move these to a different HUD addon - // commanderCanSee = 2+32; - // gunnerCanSee = 2+32; - // driverCanSee = 2+32; - }; class Helicopter_Base_F: Helicopter {}; diff --git a/addons/laser_selfdesignate/config.cpp b/addons/laser_selfdesignate/config.cpp index 33c31ba7e5..19ec28063b 100644 --- a/addons/laser_selfdesignate/config.cpp +++ b/addons/laser_selfdesignate/config.cpp @@ -10,8 +10,6 @@ class CfgPatches { }; }; -#include "CfgUI.hpp" - #include "CfgEventhandlers.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf index 0480e9f748..f5066070f7 100644 --- a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf @@ -61,13 +61,19 @@ FUNC(laserHudDesignatePFH) = { _this set[0, _args]; }; -private ["_laserTarget", "_handle", "_vehicle", "_laserUuid"]; +private ["_laserTarget", "_handle", "_vehicle", "_laserUuid", "_waveLength", "_beamSpread", "_laserCode"]; if(!GVAR(active)) then { GVAR(active) = true; TRACE_1("Activating laser", ""); - _laserUuid = [(vehicle ACE_player), ACE_player, QFUNC(findLaserSource), 1550, 1001, 1] call EFUNC(laser,laserOn); + + // Get the self-designation variables, or use defaults + _laserCode = (vehicle ACE_player) getVariable[QGVAR(currentCode), ACE_DEFAULT_LASER_CODE]; + _waveLength = (vehicle ACE_player) getVariable[QGVAR(currentWaveLength), ACE_DEFAULT_LASER_WAVELENGTH]; + _beamSpread = (vehicle ACE_player) getVariable[QGVAR(currentBeamSpread), ACE_DEFAULT_LASER_BEAMSPREAD]; + + _laserUuid = [(vehicle ACE_player), ACE_player, QFUNC(findLaserSource), _waveLength, _laserCode, _beamSpread] call EFUNC(laser,laserOn); // @TODO: Create the local target for the players side // @TODO: Nou gets to field all tickets about missing lasers.