ACE3/addons/hellfire/CfgWeapons.hpp
Brandon Danyluk f2fff98ad0 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 12:29:08 -06:00

56 lines
2.5 KiB
C++

class CfgWeapons {
class RocketPods;
class MissileLauncher;
class GVAR(launcher): RocketPods {
displayName = "AGM-114K Hellfire II";
GVAR(enabled) = 1; // handle adding interactions and adding Laser Designator
EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code)
EGVAR(laser,showHud) = 1; // show attack profile / lock on hud
magazines[] = {"6Rnd_ACE_Hellfire_AGM114K", "PylonMissile_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_3Rnd_ACE_Hellfire_AGM114K", "PylonRack_4Rnd_ACE_Hellfire_AGM114K"};
magazineWell[] += {QGVAR(K)};
autoFire = 0;
canLock = 0;
weaponLockSystem = 0;
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
soundFly[] = {"A3\Sounds_F\weapons\Rockets\rocket_fly_1",1,1.1,700};
nameSound = "MissileLauncher";
sounds[] = {"StandardSound"};
class StandardSound {
begin1[] = {"A3\Sounds_F\weapons\Rockets\missile_1",1.12202,1.3,1000};
soundBegin[] = {"begin1",1};
soundsetshot[] = {"RocketsMedium_Shot_SoundSet"};
};
cursor = "EmptyCursor";
cursorAim = "missile";
showAimCursorInternal = 0;
};
class GVAR(launcher_N): GVAR(launcher) {
displayName = "AGM-114N Hellfire II";
magazines[] = {"6Rnd_ACE_Hellfire_AGM114N", "PylonMissile_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_3Rnd_ACE_Hellfire_AGM114N", "PylonRack_4Rnd_ACE_Hellfire_AGM114N"};
magazineWell[] += {QGVAR(N)};
};
class GVAR(launcher_L): GVAR(launcher) {
displayName = "AGM-114L Hellfire ""Longbow""";
magazines[] = {"6Rnd_ACE_Hellfire_AGM114L", "PylonMissile_1Rnd_ACE_Hellfire_AGM114L", "PylonRack_1Rnd_ACE_Hellfire_AGM114L", "PylonRack_3Rnd_ACE_Hellfire_AGM114L", "PylonRack_4Rnd_ACE_Hellfire_AGM114L"};
magazineWell[] += {QGVAR(L)};
EGVAR(laser,showHud) = 1; // Just to show the attack profile
EGVAR(laser,canSelect) = 0;
class StandardSound {
begin1[] = {"A3\Sounds_F\weapons\Rockets\missile_1",1.12202,1.3,1000};
soundBegin[] = {"begin1",1};
soundsetshot[] = {"RocketsMedium_Shot_SoundSet"};
};
cursor = "EmptyCursor";
cursorAim = "missile";
showAimCursorInternal = 0;
// vanilla weapon lock systems
weaponLockSystem = 8;
cmImmunity = 0.9;
lockAcquire = 0;
weaponLockDelay = 0.1;
canLock = 2;
};
};