ACE3/addons/hot/script_component.hpp
Brandon Danyluk 1511ecc1c0 SACLOS and HOT Missiles (#6708)
* abc

* Revert "abc"

This reverts commit bcb4214bd9.

* Update to current commit

* Added HOT1 Missile and SACLOS/Wire guidance

* Added all HOT variants. Added polish to code

* Fixed bug with pylons

* Changed how seeker angle is calculated. When the wire snaps the missile goes haywire. Fixed bug where HOT2/3 missiles weren't getting missile guidance

* Replaced Wiesel FireFIST launcher with  HOT Launcher

* Remove debug defines

* Tweak thrust

* Fix formatting issues. Added true randomness. Added ACE prefixes. Added string table. Tweaked missile dynamics

* Fix bug where attack profile correction was wrong due to magnitude always being 50. Add stringtable values for relevant strings. Added reload time to Wiesel ATGM. Added "onFired" to initialize values

* Moved wire-snapping logic to attack profile

* Missile flight dynamics tweaked

* Add a crosshair offset. The missile sits in this offset relative to the crosshair

* Add LOS checks. Fix bug where wire-cutting didnt work.

* Tweak explosive range for a kill radius of ~20m. Add fragmentation

* Add AI Flags

* Person in control of missile may not be the shooter

* Fix RPT spam on missile out of LOS. Tweak missile dynamics. Add wire break sound cue

* Fix bug where missile didn't go to a fake target in front of it when out of LOS

* Use a better, more generic way to calculate direction camera is facing

* Use ACE Macros for frag values. Get config entry with CBA

* Add Wiki entry

* Add new lines to wiki. Allow for SQF expressions in config for maxCorrectableDistance

* Add CPP code tag

* Fix wiki grammer error

* Re-convert back to CBA_fnc_getConfigEntry

* UAV Gunner support, cleanup

* Fix bug where SACLOS for launcher guided weapons was off

* Add the ability to define how far ahead of the missile the attack profile will seek toward
2018-12-06 20:27:30 -06:00

29 lines
647 B
C++

#define COMPONENT hot
#define COMPONENT_BEAUTIFIED HOT
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_HOT
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_HOT
#define DEBUG_SETTINGS DEBUG_SETTINGS_HOT
#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 10
#define DEFAULT_LEAD_DISTANCE 50