mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix uninitialised values
This commit is contained in:
parent
aff19ec6ea
commit
7b7d79fbd3
@ -38,7 +38,7 @@ _navigationParams set [2, _currentPitch];
|
|||||||
private _pitchModifier = if (_pitchChange == 0) then {
|
private _pitchModifier = if (_pitchChange == 0) then {
|
||||||
1
|
1
|
||||||
} else {
|
} else {
|
||||||
abs (_pitchRate / _pitchChange);
|
abs (_pitchRate / _pitchChange)
|
||||||
};
|
};
|
||||||
private _desiredPitchChange = (_pitchChange - _pitchRate) * PROPORTIONALITY_CONSTANT * _pitchModifier;
|
private _desiredPitchChange = (_pitchChange - _pitchRate) * PROPORTIONALITY_CONSTANT * _pitchModifier;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ _navigationParams set [3, _currentYaw];
|
|||||||
private _yawModifier = if (_yawChange == 0) then {
|
private _yawModifier = if (_yawChange == 0) then {
|
||||||
1
|
1
|
||||||
} else {
|
} else {
|
||||||
abs (_yawRate / _yawChange);
|
abs (_yawRate / _yawChange)
|
||||||
};
|
};
|
||||||
private _desiredYawChange = (_yawChange - _yawRate) * PROPORTIONALITY_CONSTANT * _yawModifier;
|
private _desiredYawChange = (_yawChange - _yawRate) * PROPORTIONALITY_CONSTANT * _yawModifier;
|
||||||
|
|
||||||
@ -61,6 +61,7 @@ drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], ASLto
|
|||||||
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], [0, 0, 1] vectorAdd ASLtoAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["pitch proportional [%1] yaw proportional [%2]", _pitchModifier, _yawModifier], 1, 0.025, "TahomaB"];
|
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,1,1], [0, 0, 1] vectorAdd ASLtoAGL getPosASLVisual _projectile, 0.75, 0.75, 0, format ["pitch proportional [%1] yaw proportional [%2]", _pitchModifier, _yawModifier], 1, 0.025, "TahomaB"];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
TRACE_4("nlaw pitch/yaw info",_currentPitch,_lastPitch,_currentYaw,_lastYaw);
|
||||||
TRACE_6("nlaw navigation",_yawChange,_desiredYawChange,_pitchChange,_desiredPitchChange,_yawRate,_pitchRate);
|
TRACE_6("nlaw navigation",_yawChange,_desiredYawChange,_pitchChange,_desiredPitchChange,_yawRate,_pitchRate);
|
||||||
|
|
||||||
_projectile vectorModelToWorldVisual [_yawChange + _desiredYawChange, 0, _pitchChange + _desiredPitchChange]
|
_projectile vectorModelToWorldVisual [_yawChange + _desiredYawChange, 0, _pitchChange + _desiredPitchChange]
|
||||||
|
@ -57,10 +57,10 @@ _pitchChange = -10 max _pitchChange min 10;
|
|||||||
|
|
||||||
((velocity _projectile) call CBA_fnc_vect2polar) params ["", "_currentYaw", "_currentPitch"];
|
((velocity _projectile) call CBA_fnc_vect2polar) params ["", "_currentYaw", "_currentPitch"];
|
||||||
|
|
||||||
TRACE_3("attackProfileStateParams",_firedLOS,_yawChange,_pitchChange);
|
TRACE_5("attackProfileStateParams",_firedLOS,_yawChange,_pitchChange,_currentPitch,_currentYaw);
|
||||||
_navigationParams set [0, _yawChange];
|
_navigationParams set [0, _yawChange];
|
||||||
_navigationParams set [1, _pitchChange];
|
_navigationParams set [1, _pitchChange];
|
||||||
_navigationParams set [3, _currentPitch]; // last pitch
|
_navigationParams set [2, _currentPitch]; // last pitch
|
||||||
_navigationParams set [4, _currentYaw]; // last yaw
|
_navigationParams set [3, _currentYaw]; // last yaw
|
||||||
_navigationParams
|
_navigationParams
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user