mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ace_fcs_ace_time -> ace_fcs_time
This commit is contained in:
parent
0936238862
commit
a899c74133
@ -1,7 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(enabled) = false;
|
||||
GVAR(ACE_time) = 0;
|
||||
GVAR(time) = 0;
|
||||
GVAR(position) = [0,0,0];
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
@ -22,7 +22,7 @@ _distance = call FUNC(getRange);
|
||||
if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {};
|
||||
|
||||
GVAR(Enabled) = true;
|
||||
GVAR(ACE_time) = ACE_time;
|
||||
GVAR(time) = ACE_time;
|
||||
|
||||
if (_distance == 0) then {
|
||||
_distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision
|
||||
|
@ -60,7 +60,7 @@ private ["_movingAzimuth", "_posTarget", "_velocityTarget"];
|
||||
|
||||
// MOVING TARGETS
|
||||
_movingAzimuth = 0;
|
||||
if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) then {
|
||||
if (ACE_time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then {
|
||||
// calculate speed of target
|
||||
_posTarget = [
|
||||
(getPos _vehicle select 0) + _distance * (_weaponDirection select 0),
|
||||
@ -68,9 +68,9 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3)
|
||||
(getPos _vehicle select 2) + _distance * (_weaponDirection select 2)
|
||||
];
|
||||
_velocityTarget = [
|
||||
((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(ACE_time)),
|
||||
((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(ACE_time)),
|
||||
((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(ACE_time))
|
||||
((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(time)),
|
||||
((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(time)),
|
||||
((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(time))
|
||||
];
|
||||
|
||||
private ["_magazineType", "_ammoType", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_initSpeedCoef", "_velocityMagnitude"];
|
||||
@ -130,7 +130,7 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3)
|
||||
};
|
||||
};
|
||||
GVAR(enabled) = false;
|
||||
GVAR(ACE_time) = -1;
|
||||
GVAR(time) = -1;
|
||||
|
||||
private ["_viewDiff", "_FCSAzimuth", "_FCSMagazines", "_FCSElevation"];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user