mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
make over-fly trajectory over-fly
This commit is contained in:
parent
7b7d79fbd3
commit
76c5c6e6d3
@ -19,7 +19,7 @@ params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_statePa
|
||||
_firedEH params ["_shooter","","","","","","_projectile"];
|
||||
_launchParams params ["","_targetLaunchParams","","_attackProfile"];
|
||||
_targetLaunchParams params ["_target"];
|
||||
_stateParams params ["", "", "_attackProfileStateParams"];
|
||||
_stateParams params ["", "_seekerStateParams", "_attackProfileStateParams"];
|
||||
|
||||
// Reset _launchPos origin as projectile's height instead of player's foot
|
||||
_targetLaunchParams set [2, getPosASL _projectile];
|
||||
@ -55,6 +55,10 @@ if (_shooter == ACE_player) then {
|
||||
_yawChange = -10 max _yawChange min 10;
|
||||
_pitchChange = -10 max _pitchChange min 10;
|
||||
|
||||
_seekerStateParams set [2, _yawChange];
|
||||
_seekerStateParams set [3, _pitchChange];
|
||||
_seekerStateParams set [4, CBA_missionTime]
|
||||
|
||||
TRACE_3("attackProfileStateParams",_firedLOS,_yawChange,_pitchChange);
|
||||
_attackProfileStateParams set [0, CBA_missionTime];
|
||||
_attackProfileStateParams set [1, _firedLOS];
|
||||
|
@ -22,9 +22,17 @@ _args params ["_firedEH", "_launchParams", "", "_seekerParams", "_stateParams"];
|
||||
_firedEH params ["","","","","","","_projectile"];
|
||||
_launchParams params ["", "_targetLaunchParams", "", "_attackProfile"];
|
||||
_targetLaunchParams params ["", "", "_launchPos"];
|
||||
_stateParams params ["", "", "", "", "_navigationParams"];
|
||||
|
||||
if (_attackProfile == QGVAR(directAttack)) exitWith {[0,0,0]};
|
||||
|
||||
_seekerStateParams params ["", "", "", "_originalPitchRate", "_startTime"];
|
||||
_navigationParams params ["", "_pitchRate"];
|
||||
|
||||
// pitch up for the first second of flight to begin an over-fly trajectory
|
||||
private _pitchChange = linearConversion [0, 1, CBA_missionTime - _startTime, 1, 0, true];
|
||||
_navigationParams set [1, _originalPitchRate + _pitchChange];
|
||||
|
||||
private _projPos = getPosASL _projectile;
|
||||
|
||||
// Arm seeker after 20 meters
|
||||
|
Loading…
Reference in New Issue
Block a user