mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tweak hellfire attack profile
This commit is contained in:
parent
b4e5a29119
commit
356ff4ce4d
@ -43,15 +43,17 @@ if (_returnTargetPos isEqualTo [0, 0, 0]) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _closingRate = vectorMagnitude velocity _projectile;
|
private _closingRate = vectorMagnitude velocity _projectile;
|
||||||
private _timeToGo = (_projectilePos distance _seekerTargetPos) / _closingRate;
|
// subtract 500 meters to account for the fact that we don't want to be at the perfect pitch exactly when we cross the target
|
||||||
|
// 500 seemed good in testing
|
||||||
|
private _timeToGo = ((_projectilePos distance2d _seekerTargetPos) - 500) / _closingRate;
|
||||||
|
|
||||||
// we could do stuff like desired attack angle, but I'm not going that far today
|
// we could do stuff like desired attack angle, but I'm not going that far today
|
||||||
private _los = vectorNormalized (_seekerTargetPos vectorDiff _projectilePos);
|
private _los = _projectilePos vectorFromTo _seekerTargetPos;
|
||||||
|
|
||||||
_flightParams params ["_pitchRate", "_yawRate"];
|
_flightParams params ["_pitchRate", "_yawRate"];
|
||||||
|
|
||||||
private _angleToTarget = acos ((vectorDir _projectile) vectorCos _los);
|
private _angleToTarget = acos ((vectorDir _projectile) vectorCos _los);
|
||||||
private _atMinRotationAngle = _angleToTarget >= (0.5 * _pitchRate * _timeToGo);
|
private _atMinRotationAngle = _angleToTarget >= (_pitchRate * _timeToGo);
|
||||||
|
|
||||||
switch (_attackStage) do {
|
switch (_attackStage) do {
|
||||||
case STAGE_LAUNCH: { // Gain height quickly to pass terrain mask
|
case STAGE_LAUNCH: { // Gain height quickly to pass terrain mask
|
||||||
|
@ -25,5 +25,5 @@ _seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_se
|
|||||||
_targetData params ["_targetDirection", "_attackProfileDirection", "_targetRange", "_targetVelocity", "_targetAcceleration"];
|
_targetData params ["_targetDirection", "_attackProfileDirection", "_targetRange", "_targetVelocity", "_targetAcceleration"];
|
||||||
|
|
||||||
_attackProfileStateParams params ["_state"];
|
_attackProfileStateParams params ["_state"];
|
||||||
_state in [STAGE_ATTACK_TERMINAL, STAGE_ATTACK_CRUISE];
|
_state isEqualTo STAGE_ATTACK_TERMINAL;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "\z\ace\addons\main\script_mod.hpp"
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
// #define DEBUG_MODE_FULL
|
// #define DEBUG_MODE_FULL
|
||||||
#define DISABLE_COMPILE_CACHE
|
// #define DISABLE_COMPILE_CACHE
|
||||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_HELLFIRE
|
#ifdef DEBUG_ENABLED_HELLFIRE
|
||||||
|
Loading…
Reference in New Issue
Block a user