mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed private variable overrides and timing failure.
This commit is contained in:
parent
01535c7f5c
commit
198d4f3540
@ -68,7 +68,7 @@ class CfgAmmo {
|
||||
seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
|
||||
|
||||
// Attack profile type selection
|
||||
defaultAttackProfile = "PYM";
|
||||
defaultAttackProfile = "LIN";
|
||||
attackProfiles[] = { "LIN", "DIR", "MID", "HI", "TOP", "PYM" };
|
||||
};
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ if ( isNil "_lockMode" || { ! ( _lockMode in (getArray (_config >> "seekerLockMo
|
||||
|
||||
|
||||
TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile);
|
||||
[FUNC(guidancePFH), 0.1, [_this,
|
||||
[FUNC(guidancePFH), 0, [_this,
|
||||
[ACE_player,
|
||||
[_target, _targetPos, _launchPos],
|
||||
_seekerType,
|
||||
|
@ -1,7 +1,11 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_args", "_launchParams", "_targetLaunchParams", "_config", "_flightParams", "_seekerParams"];
|
||||
private["_args", "_stateParams", "_launchParams", "_targetLaunchParams", "_config", "_flightParams", "_seekerParams", "_seekerTargetPos"];
|
||||
private["_lastRunTime", "_runtimeDelta", "_profileAdjustedTargetPos", "_targetVectorSeeker", "_targetVector"];
|
||||
private["_minDeflection", "_maxDeflection", "_incDeflection"];
|
||||
private["_yVec", "_zVec", "_xVec"];
|
||||
|
||||
_args = _this select 0;
|
||||
EXPLODE_7_PVT((_args select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||
|
||||
@ -41,6 +45,7 @@ if(!isNil "_seekerTargetPos") then {
|
||||
_targetVector = [0,0,0] vectorFromTo _targetVectorSeeker;
|
||||
TRACE_1("", _targetVectorSeeker, _targetVector);
|
||||
|
||||
private["_yaw", "_pitch"];
|
||||
_yaw = 0;
|
||||
_pitch = 0;
|
||||
|
||||
@ -65,9 +70,10 @@ if(!isNil "_seekerTargetPos") then {
|
||||
#endif
|
||||
|
||||
if(accTime > 0) then {
|
||||
private["_adjustTime", "_outVector", "_vectorTo"];
|
||||
_adjustTime = 1/accTime;
|
||||
_adjustTime = _adjustTime * (_runtimeDelta / 0.1);
|
||||
|
||||
_adjustTime = _adjustTime * (_runtimeDelta / 0.01);
|
||||
TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / 0.1));
|
||||
_outVector = [_projectile, [_xVec, _yVec, _zVec], [_yaw, _adjustTime, _pitch]] call FUNC(translateToModelSpace);
|
||||
_vectorTo = _projectilePos vectorFromTo _outVector;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||
|
Loading…
Reference in New Issue
Block a user