Skip to content

Commit

Permalink
Laser - Remove unnecessary EGVAR (#10139)
Browse files Browse the repository at this point in the history
Remove unnecessary EGVAR
  • Loading branch information
johnb432 authored Jul 22, 2024
1 parent db339ab commit 43c1f97
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions addons/laser/functions/fnc_addLaserTarget.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ params ["_targetObject", "_vehicle"];
TRACE_2("params",_targetObject,_vehicle);

// Get the designator variables, or use defaults
private _waveLength = _vehicle getVariable [QEGVAR(laser,waveLength), ACE_DEFAULT_LASER_WAVELENGTH];
private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];
private _beamSpread = _vehicle getVariable [QEGVAR(laser,beamSpread), ACE_DEFAULT_LASER_BEAMSPREAD];
private _waveLength = _vehicle getVariable [QGVAR(waveLength), ACE_DEFAULT_LASER_WAVELENGTH];
private _laserCode = _vehicle getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE];
private _beamSpread = _vehicle getVariable [QGVAR(beamSpread), ACE_DEFAULT_LASER_BEAMSPREAD];
TRACE_3("codes",_waveLength,_laserCode,_beamSpread);

// Laser method is the method ACE_Laser will use to determine from where to where it should project the designator cone
Expand Down
2 changes: 1 addition & 1 deletion addons/laser/functions/fnc_laserTargetPFH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ GVAR(trackedLaserTargets) = GVAR(trackedLaserTargets) select {
TRACE_1("Laser off:",_laserUuid);
false
} else {
private _newCode = _owner getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];
private _newCode = _owner getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE];
if (_laserCode != _newCode) then {
TRACE_2("code change",_newCode,_laserCode);
[QGVAR(updateCode), [_laserUuid, _newCode]] call CBA_fnc_globalEvent;
Expand Down
2 changes: 1 addition & 1 deletion addons/laser/functions/fnc_showVehicleHud.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ GVAR(pfID) = [{
// Do Laser Scan:
private _ammo = getText (configFile >> "CfgMagazines" >> _vehicle currentMagazineTurret _turretPath >> "ammo");
private _laserSource = _vehicle modelToWorldWorld (_vehicle selectionPosition _seekerSource);
private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];
private _laserCode = _vehicle getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE];
private _seekerAngle = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_missileguidance" >> "seekerAngle");
private _seekerMaxRange = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_missileguidance" >> "seekerMaxRange");
private _laserResult = [_laserSource, vectorDir _vehicle, _seekerAngle, _seekerMaxRange, [ACE_DEFAULT_LASER_WAVELENGTH,ACE_DEFAULT_LASER_WAVELENGTH], _laserCode, _vehicle] call EFUNC(laser,seekerFindLaserSpot);
Expand Down
2 changes: 1 addition & 1 deletion addons/laser/functions/fnc_toggleLST.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if (_enabled) exitWith {};
[_pfhID] call CBA_fnc_removePerFrameHandler;
};

private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];
private _laserCode = _vehicle getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE];
private _angle = 25;

private _pos = _vehicle modelToWorldVisualWorld [0,0,0];
Expand Down

0 comments on commit 43c1f97

Please sign in to comment.