Laser - Remove unnecessary EGVAR (#10139)

Remove unnecessary EGVAR
This commit is contained in:
johnb432 2024-07-22 19:27:26 +02:00 committed by GitHub
parent db339ab8e3
commit 43c1f97dfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View File

@ -20,9 +20,9 @@ params ["_targetObject", "_vehicle"];
TRACE_2("params",_targetObject,_vehicle); TRACE_2("params",_targetObject,_vehicle);
// Get the designator variables, or use defaults // Get the designator variables, or use defaults
private _waveLength = _vehicle getVariable [QEGVAR(laser,waveLength), ACE_DEFAULT_LASER_WAVELENGTH]; private _waveLength = _vehicle getVariable [QGVAR(waveLength), ACE_DEFAULT_LASER_WAVELENGTH];
private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; private _laserCode = _vehicle getVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE];
private _beamSpread = _vehicle getVariable [QEGVAR(laser,beamSpread), ACE_DEFAULT_LASER_BEAMSPREAD]; private _beamSpread = _vehicle getVariable [QGVAR(beamSpread), ACE_DEFAULT_LASER_BEAMSPREAD];
TRACE_3("codes",_waveLength,_laserCode,_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 // Laser method is the method ACE_Laser will use to determine from where to where it should project the designator cone

View File

@ -29,7 +29,7 @@ GVAR(trackedLaserTargets) = GVAR(trackedLaserTargets) select {
TRACE_1("Laser off:",_laserUuid); TRACE_1("Laser off:",_laserUuid);
false false
} else { } 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 { if (_laserCode != _newCode) then {
TRACE_2("code change",_newCode,_laserCode); TRACE_2("code change",_newCode,_laserCode);
[QGVAR(updateCode), [_laserUuid, _newCode]] call CBA_fnc_globalEvent; [QGVAR(updateCode), [_laserUuid, _newCode]] call CBA_fnc_globalEvent;

View File

@ -91,7 +91,7 @@ GVAR(pfID) = [{
// Do Laser Scan: // Do Laser Scan:
private _ammo = getText (configFile >> "CfgMagazines" >> _vehicle currentMagazineTurret _turretPath >> "ammo"); private _ammo = getText (configFile >> "CfgMagazines" >> _vehicle currentMagazineTurret _turretPath >> "ammo");
private _laserSource = _vehicle modelToWorldWorld (_vehicle selectionPosition _seekerSource); 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 _seekerAngle = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_missileguidance" >> "seekerAngle");
private _seekerMaxRange = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_missileguidance" >> "seekerMaxRange"); 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); private _laserResult = [_laserSource, vectorDir _vehicle, _seekerAngle, _seekerMaxRange, [ACE_DEFAULT_LASER_WAVELENGTH,ACE_DEFAULT_LASER_WAVELENGTH], _laserCode, _vehicle] call EFUNC(laser,seekerFindLaserSpot);

View File

@ -39,7 +39,7 @@ if (_enabled) exitWith {};
[_pfhID] call CBA_fnc_removePerFrameHandler; [_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 _angle = 25;
private _pos = _vehicle modelToWorldVisualWorld [0,0,0]; private _pos = _vehicle modelToWorldVisualWorld [0,0,0];