mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Revert remove GPS files
This commit is contained in:
parent
af05b86a9c
commit
9db3160e7f
@ -55,6 +55,14 @@ class GVAR(AttackProfiles) {
|
|||||||
functionName = QFUNC(attackProfile_BEAM);
|
functionName = QFUNC(attackProfile_BEAM);
|
||||||
onFired = QFUNC(wire_onFired); // since Beam guidance is pretty much the same as Wire guidance, we can reuse this
|
onFired = QFUNC(wire_onFired); // since Beam guidance is pretty much the same as Wire guidance, we can reuse this
|
||||||
};
|
};
|
||||||
|
class JDAM {
|
||||||
|
name = "";
|
||||||
|
visualName = "";
|
||||||
|
description = "";
|
||||||
|
|
||||||
|
functionName = QFUNC(attackProfile_JDAM);
|
||||||
|
onFired = QFUNC(gps_attackOnFired);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class GVAR(SeekerTypes) {
|
class GVAR(SeekerTypes) {
|
||||||
@ -88,6 +96,14 @@ class GVAR(SeekerTypes) {
|
|||||||
functionName = QFUNC(seekerType_MWR);
|
functionName = QFUNC(seekerType_MWR);
|
||||||
onFired = QFUNC(mwr_onFired);
|
onFired = QFUNC(mwr_onFired);
|
||||||
};
|
};
|
||||||
|
class GPS {
|
||||||
|
name = "";
|
||||||
|
visualName = "";
|
||||||
|
description = "";
|
||||||
|
|
||||||
|
functionName = QFUNC(seekerType_GPS);
|
||||||
|
onFired = QFUNC(gps_seekerOnFired);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class GVAR(NavigationTypes) {
|
class GVAR(NavigationTypes) {
|
||||||
|
@ -45,15 +45,33 @@ PREP(seekerType_Optic);
|
|||||||
PREP(seekerType_SACLOS);
|
PREP(seekerType_SACLOS);
|
||||||
PREP(seekerType_Doppler);
|
PREP(seekerType_Doppler);
|
||||||
PREP(seekerType_MWR);
|
PREP(seekerType_MWR);
|
||||||
|
PREP(seekerType_GPS);
|
||||||
|
|
||||||
// Attack Profiles OnFired
|
// Attack Profiles OnFired
|
||||||
PREP(wire_onFired);
|
PREP(wire_onFired);
|
||||||
|
PREP(gps_attackOnFired);
|
||||||
|
|
||||||
// Seeker OnFired
|
// Seeker OnFired
|
||||||
PREP(SACLOS_onFired);
|
PREP(SACLOS_onFired);
|
||||||
PREP(mwr_onFired);
|
PREP(mwr_onFired);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
PREP(IR_onFired);
|
||||||
|
PREP(gps_seekerOnFired);
|
||||||
|
>>>>>>> parent of 744cd45ee (remove gps definitions)
|
||||||
|
|
||||||
// Navigation OnFired
|
// Navigation OnFired
|
||||||
PREP(proNav_onFired);
|
PREP(proNav_onFired);
|
||||||
PREP(line_onFired);
|
PREP(line_onFired);
|
||||||
|
|
||||||
|
// GPS ui
|
||||||
|
PREP(gps_onLoad);
|
||||||
|
PREP(gps_onUnload);
|
||||||
|
PREP(gps_pbModeCycle);
|
||||||
|
PREP(gps_confirm);
|
||||||
|
PREP(gps_modeSelect);
|
||||||
|
PREP(gps_saveAttackSettings);
|
||||||
|
PREP(gps_loadAttackSettings);
|
||||||
|
PREP(gps_getAttackData);
|
||||||
|
PREP(gps_setupVehicle);
|
||||||
|
|
||||||
|
@ -12,3 +12,19 @@
|
|||||||
|
|
||||||
GVAR(dev_fnc_projectileCamera) = compile preprocessFileLineNumbers QPATHTOF(dev\projectileCamera.sqf);
|
GVAR(dev_fnc_projectileCamera) = compile preprocessFileLineNumbers QPATHTOF(dev\projectileCamera.sqf);
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
|
["ace_settingsInitialized", {
|
||||||
|
["turret", LINKFUNC(gps_setupVehicle), false] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
["vehicle", LINKFUNC(gps_setupVehicle), true] call CBA_fnc_addPlayerEventHandler; // only one of these needs the retro flag
|
||||||
|
|
||||||
|
// Add UAV Control Compatibility
|
||||||
|
["ACE_controlledUAV", {
|
||||||
|
params ["_UAV", "_seatAI", "_turret", "_position"];
|
||||||
|
TRACE_4("ACE_controlledUAV EH",_UAV,_seatAI,_turret,_position);
|
||||||
|
if (!isNull _seatAI) then {
|
||||||
|
[_seatAI] call FUNC(gps_setupVehicle);
|
||||||
|
};
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
@ -11,6 +11,20 @@ PREP_RECOMPILE_END;
|
|||||||
// As weapons take config changes, there is little point in being able to disable guidance
|
// As weapons take config changes, there is little point in being able to disable guidance
|
||||||
if (isNil QGVAR(enabled)) then { GVAR(enabled) = 2; };
|
if (isNil QGVAR(enabled)) then { GVAR(enabled) = 2; };
|
||||||
|
|
||||||
|
GVAR(gps_currentSettings) = [
|
||||||
|
[0, 0, 0], // attack position
|
||||||
|
-1, // impact angle
|
||||||
|
-1 // attack heading
|
||||||
|
];
|
||||||
|
|
||||||
|
GVAR(gps_pbMode) = 0;
|
||||||
|
GVAR(gps_settings) = createHashMap;
|
||||||
|
for "_i" from 0 to MAX_PB_MODES do {
|
||||||
|
GVAR(gps_settings) set [_i, GVAR(currentSettings)];
|
||||||
|
};
|
||||||
|
|
||||||
|
GVAR(gps_mode) = "pb";
|
||||||
|
|
||||||
GVAR(debug_enableMissileCamera) = false;
|
GVAR(debug_enableMissileCamera) = false;
|
||||||
GVAR(debug_drawGuidanceInfo) = false;
|
GVAR(debug_drawGuidanceInfo) = false;
|
||||||
|
|
||||||
|
@ -19,3 +19,5 @@ class CfgPatches {
|
|||||||
#include "CfgAmmo.hpp"
|
#include "CfgAmmo.hpp"
|
||||||
#include "CfgMagazines.hpp"
|
#include "CfgMagazines.hpp"
|
||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
|
|
||||||
|
#include "GPSDialog.hpp"
|
||||||
|
28
addons/missileguidance/functions/fnc_seekerType_GPS.sqf
Normal file
28
addons/missileguidance/functions/fnc_seekerType_GPS.sqf
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: tcvm
|
||||||
|
* Returns GPS position. That's it.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 1: Guidance Arg Array <ARRAY>
|
||||||
|
* 2: Seeker State <ARRAY>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Position of wanted missile pos relative to the camera direction <ARRAY>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [] call ace_missileguidance_fnc_seekerType_gps
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
params ["", "_args", "_seekerStateParams"];
|
||||||
|
_args params ["", "", "", "", "", "_targetData"];
|
||||||
|
(_seekerStateParams select 0) params ["_attackPosition"];
|
||||||
|
|
||||||
|
_targetData set [0, (getPosASL _projectile) vectorFromTo _attackPosition];
|
||||||
|
_targetData set [2, (getPosASL _projectile) distance _attackPosition];
|
||||||
|
_targetData set [3, [0, 0, 0]];
|
||||||
|
_targetData set [4, [0, 0, 0]];
|
||||||
|
|
||||||
|
_attackPosition
|
||||||
|
|
@ -29,3 +29,9 @@
|
|||||||
#define DEFAULT_LEAD_DISTANCE 5
|
#define DEFAULT_LEAD_DISTANCE 5
|
||||||
#define ACTIVE_RADAR_POLL_FREQUENCY (1 / 7)
|
#define ACTIVE_RADAR_POLL_FREQUENCY (1 / 7)
|
||||||
#define ACTIVE_RADAR_MINIMUM_SCAN_AREA 30
|
#define ACTIVE_RADAR_MINIMUM_SCAN_AREA 30
|
||||||
|
|
||||||
|
#include "idc_defines.hpp"
|
||||||
|
#define CONTROLS_DISABLED_IN_TOO [GPS_UI_PB_MISSION_BACKWARD, GPS_UI_PB_MISSION_FORWARD, GPS_UI_EASTING, GPS_UI_NORTHING, GPS_UI_HEIGHT]
|
||||||
|
|
||||||
|
#define MAX_PB_MODES 6
|
||||||
|
|
||||||
|
@ -205,5 +205,38 @@
|
|||||||
<Chinese>循環切換開火模式</Chinese>
|
<Chinese>循環切換開火模式</Chinese>
|
||||||
<Turkish>Ateşleme Modunu Değiştir</Turkish>
|
<Turkish>Ateşleme Modunu Değiştir</Turkish>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_header">
|
||||||
|
<English>GPS Weapon Setup</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_too">
|
||||||
|
<English>TARGET OF OPPORTUNITY</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_pp">
|
||||||
|
<English>PRE-PLANNED</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_easting">
|
||||||
|
<English>Easting</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_northing">
|
||||||
|
<English>Northing</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_altitude">
|
||||||
|
<English>Altitude</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_impact_angle">
|
||||||
|
<English>Impact Angle</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_attack_heading">
|
||||||
|
<English>Attack Heading</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_cancel">
|
||||||
|
<English>Cancel</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_confirm">
|
||||||
|
<English>Confirm</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MissileGuidance_GPS_ui_pp_short">
|
||||||
|
<English>PP</English>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user