ACE3/addons/missileguidance/script_component.hpp

52 lines
1.4 KiB
C++
Raw Normal View History

2016-05-30 16:37:03 +00:00
#define COMPONENT missileguidance
2016-06-20 09:41:17 +00:00
#define COMPONENT_BEAUTIFIED Missile Guidance
2016-05-30 16:37:03 +00:00
#include "\z\ace\addons\main\script_mod.hpp"
2021-05-18 06:32:55 +00:00
// #define DRAW_GUIDANCE_INFO
2021-04-14 08:29:27 +00:00
// #define ENABLE_PROJECTILE_CAMERA
// #define DEBUG_MODE_FULL
2021-10-16 03:35:25 +00:00
#define DISABLE_COMPILE_CACHE
2016-05-30 16:37:03 +00:00
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_MISSILEGUIDANCE
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MISSILEGUIDANCE
#define DEBUG_SETTINGS DEBUG_SETTINGS_MISSILEGUIDANCE
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define RANDOM_VECTOR_3D (call {\
private _z = random 2 - 1;\
private _r = sqrt (1 - _z^2);\
private _theta = random 360;\
[_r * cos _theta, _r * sin _theta, _z]\
})
#define DEFAULT_CORRECTION_DISTANCE 2
#define DEFAULT_LEAD_DISTANCE 5
Add AGM-114L Active Radar Homing Hellfire (#7337) * Create AGM-114L * If we lose LOS dont continue tracking magically Allow for datalinked targets to donate data to the missile. * Update documentation * RHS 2x hellfire compatability * Make ARH more realistic by not allowing to switch targets after firing * Fix filename. Change Hellfire attack profile to lead target. Switch to two LOS checks. We check two Line's of Sight to ensure that we are 100% gone from the target. A raw LOS check will be blocked by bushes and light trees while the checkVisibility wont while on the otherhand smoke will block a visiblity check but not a raw LOS check. We get best of both worlds with this. I changed the attack profile so that it will lead moving targets. This isnt needed with the laser version because the user will "lead" the target if needed, but with the radar scan we have velocity information so we might as well lead the target as much as possible * Change function calls to FUNC macro. Slightly change radar logic. Up poll frequency to 7hz Instead of the missile immediately going active when the shooter doesn't have radar, check if targets are in datalink. If they are, use the datalink to guide the missile instead of its internal radar. * Add logic for missiles launched without target If a missile is fired without a locked target, it will immediately go active and target the first thing its seeker picks up. This is an incredibly dangerous trait of active radar homing missiles and is so in this implementation. Be careful! * Change from `exitWith` to basic `then` Legacy code that never got changed. This is essentially what happened before * Update CfgMagazineWells.hpp Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2019-12-30 18:29:08 +00:00
#define ACTIVE_RADAR_POLL_FREQUENCY (1 / 7)
#define ACTIVE_RADAR_MINIMUM_SCAN_AREA 30
2021-05-25 03:53:19 +00:00
#define TERCOM_STATE_SEEKING_BASKET 0
#define TERCOM_STATE_FOLLOWING_TERRAIN 1
#define TERCOM_STATE_TERMINAL 2
#define GPS_UI_TOO 1704211
#define GPS_UI_PB 1704112
#define GPS_UI_PB_MISSION 1704113
#define GPS_UI_PB_MISSION_BACKWARD 1704114
#define GPS_UI_PB_MISSION_FORWARD 1704115
#define GPS_UI_EASTING 1704116
#define GPS_UI_NORTHING 1704117
#define GPS_UI_HEIGHT 1704118
#define GPS_UI_ANGLE 1704119
#define GPS_UI_HEADING 1704120
#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