Skip to content

Commit

Permalink
missile_hud - Add hud for GPS seeker (#10749)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Feb 21, 2025
1 parent cc3b2fa commit cddcc68
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 2 deletions.
3 changes: 3 additions & 0 deletions addons/missile_hud/ACE_GuidanceConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ class EGVAR(missileguidance,SeekerTypes) {
class SALH {
hudInfo = QFUNC(info_salh);
};
class GPS {
hudInfo = QFUNC(info_gps);
};
};
1 change: 1 addition & 0 deletions addons/missile_hud/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PREP(createCtrlFromElement);
PREP(getCurrentWeapon);
PREP(info_gps);
PREP(info_salh);
PREP(isElementValid);
PREP(registerDefaultHud);
Expand Down
30 changes: 30 additions & 0 deletions addons/missile_hud/functions/fnc_info_gps.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Generates HUD info for GPS seeker.
*
* Arguments:
* None
*
* Return Value:
* Element array <ARRAY>
*
* Example:
* [["TEXT", "My Test", [1, 0.4, 5]]] call ace_missile_hud_fnc_info_gps
*
* Public: No
*/

// params ["_idleText", "_lockedText", "_unit", "_vehicle", "_ammoConfig"];

private _output = [["TEXT", "GPS", [1, 1, 1]]];

([] call EFUNC(missileguidance,gps_getAttackData)) params [["_position", [0,0,0]]];
if (_position isNotEqualTo [0,0,0]) then {
([_position] call EFUNC(common,getMapGridFromPos)) params ["_easting", "_northing"];
_output pushBack ["TEXT", format ["%1 %2", _easting, _northing], [1, 1, 1]];
} else {
_output pushBack ["TEXT", "----- -----", [1, 1, 1]];
};

_output
2 changes: 2 additions & 0 deletions addons/missile_sdb/CfgMagazines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ class CfgMagazines {
class PylonRack_Bomb_SDB_x4;
class GVAR(magazine_bomb_SDB_x1): magazine_Bomb_SDB_x1 {
displayName = CSTRING(39_1x);
descriptionShort = CSTRING(pylonDescription);
author = "Dani (TCVM)";
ammo = QGVAR(sdb);
};

class GVAR(PylonRack_bomb_SDB_x4): PylonRack_Bomb_SDB_x4 {
displayName = CSTRING(39_4x);
descriptionShort = CSTRING(pylonDescription);
author = "Dani (TCVM)";
ammo = QGVAR(sdb);
pylonWeapon = QGVAR(sdb);
Expand Down
7 changes: 5 additions & 2 deletions addons/missile_sdb/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
<Key ID="STR_ACE_MISSILE_SDB_39">
<English>GBU-39 [ACE]</English>
</Key>
<Key ID="STR_ACE_MISSILE_SDB_pylonDescription">
<English>250 pound GPS guided glide bomb</English>
</Key>
<Key ID="STR_ACE_MISSILE_SDB_39_1x">
<English>1x GBU-39 [ACE]</English>
<English>1x GBU-39 SDB [ACE]</English>
</Key>
<Key ID="STR_ACE_MISSILE_SDB_39_4x">
<English>4x GBU-39 [ACE]</English>
<English>4x GBU-39 SDB [ACE]</English>
</Key>
</Package>
</Project>

0 comments on commit cddcc68

Please sign in to comment.