Skip to content

Commit

Permalink
Missile Guidance - remove needed config entry on mclos weapons (acemo…
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Feb 22, 2025
1 parent 646ea4c commit 1f1ad2d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions addons/missileguidance/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ for "_i" from 0 to MAX_PB_MODES do {
GVAR(gps_mode) = "pb";
GVAR(gps_weapons) = createHashMap;

GVAR(mclos_weapons) = createHashMap;

GVAR(debug_enableMissileCamera) = false;
GVAR(debug_drawGuidanceInfo) = false;

Expand Down
1 change: 0 additions & 1 deletion addons/missileguidance/dev/mock_weapons.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
class MissileLauncher;
class GVAR(mock_w_Malyutka): MissileLauncher {
displayName = "Test Malyutka";
GVAR(hasMCLOSControl) = 1;
magazineReloadTime=1;
magazines[] = { QGVAR(mock_m_Malyutka) };
};
10 changes: 8 additions & 2 deletions addons/missileguidance/functions/fnc_MCLOS_buttonPressed.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ if (_player == _shooter) exitWith {};
private _turret = _shooter unitTurret _player;

if (((_shooter weaponsTurret _turret) findIf {
(getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(hasMCLOSControl))) == 1
private _weapon = _x;
GVAR(mclos_weapons) getOrDefaultCall [_weapon, {
((compatibleMagazines _weapon) findIf {
private _mag = _x;
private _ammo = getText (configFile >> "CfgMagazines" >> _mag >> "ammo");
("MCLOS" in getArray (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON) >> "seekerTypes"))
}) != -1}, true]
}) == -1) exitWith { false };


playSound "ACE_Sound_Click_20db";
playSound "ACE_Sound_Click_10db";

private _currentDirection = _shooter getVariable [QGVAR(MCLOS_direction), [0, 0, 0]];
// Send data across network for handling non-local projectiles
Expand Down

0 comments on commit 1f1ad2d

Please sign in to comment.