mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Titan Work.
This commit is contained in:
parent
583347aaab
commit
8710bee3b8
@ -1,14 +1,17 @@
|
||||
class RscControlsGroup;
|
||||
class RscPicture;
|
||||
class RscMapControl;
|
||||
class VScrollbar;
|
||||
class HScrollbar;
|
||||
|
||||
|
||||
// Taken from AGM for optics management.
|
||||
|
||||
class RscInGameUI {
|
||||
class RscOptics_titan {
|
||||
idd = 300;
|
||||
controls[] = {"CA_javelin_elements_group"};
|
||||
class CA_javelin_elements_group: RscControlsGroup
|
||||
controls[] = {"ACE_Titan_elements_group"};
|
||||
class ACE_Titan_elements_group: RscControlsGroup
|
||||
{
|
||||
x = "SafezoneX";
|
||||
y = "SafezoneY";
|
||||
@ -37,7 +40,7 @@ class RscInGameUI {
|
||||
h = 0;
|
||||
};
|
||||
|
||||
class CA_Javelin_Day_mode_off: RscPicture {
|
||||
class ACE_Titan_Day_mode_off: RscPicture {
|
||||
idc = 1001;
|
||||
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.03/4)*3*SafezoneH - SafezoneX";
|
||||
y = "SafezoneY+SafezoneH*0.031 - SafezoneY";
|
||||
@ -47,17 +50,17 @@ class RscInGameUI {
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\day_co.paa";
|
||||
};
|
||||
|
||||
class CA_Javelin_Day_mode: CA_Javelin_Day_mode_off {
|
||||
class ACE_Titan_Day_mode: ACE_Titan_Day_mode_off {
|
||||
idc = 160;
|
||||
colorText[] = {0.2941,0.8745,0.2157,1.0};
|
||||
};
|
||||
class CA_Javelin_WFOV_mode_off: CA_Javelin_Day_mode_off {
|
||||
class ACE_Titan_WFOV_mode_off: ACE_Titan_Day_mode_off {
|
||||
idc = 1004;
|
||||
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.307/4)*3*SafezoneH - SafezoneX";
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\wfov_co.paa";
|
||||
};
|
||||
|
||||
class CA_Javelin_WFOV_mode_group: RscControlsGroup {
|
||||
class ACE_Titan_WFOV_mode_group: RscControlsGroup {
|
||||
x = "SafezoneX";
|
||||
y = "SafezoneY";
|
||||
w = "SafezoneW";
|
||||
@ -75,7 +78,7 @@ class RscInGameUI {
|
||||
height = 0.001;
|
||||
};
|
||||
class Controls {
|
||||
class CA_Javelin_WFOV_mode: CA_Javelin_WFOV_mode_off {
|
||||
class ACE_Titan_WFOV_mode: ACE_Titan_WFOV_mode_off {
|
||||
idc = -1;
|
||||
y = "0.031*SafeZoneH - SafezoneY";
|
||||
x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.307/4)*3*SafezoneH - SafezoneX";
|
||||
@ -83,12 +86,12 @@ class RscInGameUI {
|
||||
};
|
||||
};
|
||||
};
|
||||
class CA_Javelin_NFOV_mode_off: CA_Javelin_Day_mode_off {
|
||||
class ACE_Titan_NFOV_mode_off: ACE_Titan_Day_mode_off {
|
||||
idc = 1003;
|
||||
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.586/4)*3*SafezoneH - SafezoneX";
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\nfov_co.paa";
|
||||
};
|
||||
class CA_Javelin_NFOV_mode_group: RscControlsGroup {
|
||||
class ACE_Titan_NFOV_mode_group: RscControlsGroup {
|
||||
x = "SafezoneX";
|
||||
y = "SafezoneY";
|
||||
w = "SafezoneW-SafezoneX";
|
||||
@ -107,7 +110,7 @@ class RscInGameUI {
|
||||
height = 0.001;
|
||||
};
|
||||
class Controls {
|
||||
class CA_Javelin_NFOV_mode: CA_Javelin_NFOV_mode_off {
|
||||
class ACE_Titan_NFOV_mode: ACE_Titan_NFOV_mode_off {
|
||||
idc = -1;
|
||||
x = "((SafezoneW -SafezoneH*3/4)/2)+ (0.586/4)*3*SafezoneH - SafezoneX";
|
||||
y = "0.031*SafeZoneH - SafezoneY";
|
||||
@ -115,55 +118,55 @@ class RscInGameUI {
|
||||
};
|
||||
};
|
||||
};
|
||||
class CA_Javelin_SEEK_off: CA_Javelin_Day_mode_off {
|
||||
class ACE_Titan_SEEK_off: ACE_Titan_Day_mode_off {
|
||||
idc = 1005;
|
||||
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.863/4)*3*SafezoneH - SafezoneX";
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\seek_co.paa";
|
||||
};
|
||||
class CA_Javelin_SEEK: CA_Javelin_SEEK_off {
|
||||
class ACE_Titan_SEEK: ACE_Titan_SEEK_off {
|
||||
idc = 166;
|
||||
colorText[] = {0.2941,0.8745,0.2157,1.0};
|
||||
};
|
||||
class CA_Javelin_Missle_off: CA_Javelin_Day_mode_off {
|
||||
class ACE_Titan_Missle_off: ACE_Titan_Day_mode_off {
|
||||
idc = 1032;
|
||||
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (-0.134/4)*3*SafezoneH - SafezoneX";
|
||||
y = "(SafezoneY + 0.208*SafezoneH) - SafezoneY";
|
||||
colorText[] = {0.2941,0.2941,0.2941,1.0};
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\missle_co.paa";
|
||||
};
|
||||
class CA_Javelin_Missle: CA_Javelin_Missle_off {
|
||||
class ACE_Titan_Missle: ACE_Titan_Missle_off {
|
||||
idc = 167;
|
||||
colorText[] = {0.9255,0.5216,0.1216,1.0};
|
||||
};
|
||||
class CA_Javelin_CLU_off: CA_Javelin_Missle_off {
|
||||
class ACE_Titan_CLU_off: ACE_Titan_Missle_off {
|
||||
idc = 1027;
|
||||
y = "(SafezoneY + 0.436*SafezoneH) - SafezoneY";
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\clu_co.paa";
|
||||
};
|
||||
class CA_Javelin_HangFire_off: CA_Javelin_Missle_off {
|
||||
class ACE_Titan_HangFire_off: ACE_Titan_Missle_off {
|
||||
idc = 1028;
|
||||
y = "(SafezoneY + 0.669*SafezoneH) - SafezoneY";
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\hangfire_co.paa";
|
||||
};
|
||||
class CA_Javelin_TOP_off: CA_Javelin_Day_mode_off {
|
||||
class ACE_Titan_TOP_off: ACE_Titan_Day_mode_off {
|
||||
idc = 1006;
|
||||
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (1.023/4)*3*SafezoneH - SafezoneX";
|
||||
y = "(SafezoneY + 0.208*SafezoneH) - SafezoneY";
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\top_co.paa";
|
||||
};
|
||||
class CA_Javelin_DIR: CA_Javelin_Day_mode {
|
||||
class ACE_Titan_DIR: ACE_Titan_Day_mode {
|
||||
idc = 1007;
|
||||
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (1.023/4)*3*SafezoneH - SafezoneX";
|
||||
y = "(SafezoneY + 0.436*SafezoneH) - SafezoneY";
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\dir_co.paa";
|
||||
};
|
||||
class CA_Javelin_FLTR_mode_off: CA_Javelin_Day_mode_off {
|
||||
class ACE_Titan_FLTR_mode_off: ACE_Titan_Day_mode_off {
|
||||
idc = 1002;
|
||||
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (1.023/4)*3*SafezoneH - SafezoneX";
|
||||
y = "(SafezoneY + 0.669*SafezoneH) - SafezoneY";
|
||||
text = "\A3\ui_f\data\igui\rscingameui\rscoptics_titan\fltr_co.paa";
|
||||
};
|
||||
class CA_Javelin_FLTR_mode: CA_Javelin_FLTR_mode_off {
|
||||
class ACE_Titan_FLTR_mode: ACE_Titan_FLTR_mode_off {
|
||||
idc = 161;
|
||||
colorText[] = {0.2941,0.8745,0.2157,1.0};
|
||||
};
|
||||
@ -177,21 +180,21 @@ class RscInGameUI {
|
||||
// orange colorText[] = {0.9255, 0.5216, 0.1216, 1.0};
|
||||
|
||||
/*
|
||||
CA_javelin_elements_group: 170
|
||||
CA_Javelin_Day_mode_off: 1001
|
||||
CA_Javelin_Day_mode: 160
|
||||
CA_Javelin_WFOV_mode_off: 1004
|
||||
CA_Javelin_WFOV_mode_group: 163
|
||||
CA_Javelin_NFOV_mode_off: 1003
|
||||
CA_Javelin_NFOV_mode_group: 162
|
||||
CA_Javelin_SEEK_off: 1005 //1001
|
||||
CA_Javelin_SEEK: 166
|
||||
CA_Javelin_Missle_off: 1032
|
||||
CA_Javelin_Missle: 167
|
||||
CA_Javelin_CLU_off: 1027
|
||||
CA_Javelin_HangFire_off: 1028
|
||||
CA_Javelin_TOP_off: 1006
|
||||
CA_Javelin_DIR: 1007
|
||||
CA_Javelin_FLTR_mode_off: 1002
|
||||
CA_Javelin_FLTR_mode: 161
|
||||
ACE_Titan_elements_group: 170
|
||||
ACE_Titan_Day_mode_off: 1001
|
||||
ACE_Titan_Day_mode: 160
|
||||
ACE_Titan_WFOV_mode_off: 1004
|
||||
ACE_Titan_WFOV_mode_group: 163
|
||||
ACE_Titan_NFOV_mode_off: 1003
|
||||
ACE_Titan_NFOV_mode_group: 162
|
||||
ACE_Titan_SEEK_off: 1005 //1001
|
||||
ACE_Titan_SEEK: 166
|
||||
ACE_Titan_Missle_off: 1032
|
||||
ACE_Titan_Missle: 167
|
||||
ACE_Titan_CLU_off: 1027
|
||||
ACE_Titan_HangFire_off: 1028
|
||||
ACE_Titan_TOP_off: 1006
|
||||
ACE_Titan_DIR: 1007
|
||||
ACE_Titan_FLTR_mode_off: 1002
|
||||
ACE_Titan_FLTR_mode: 161
|
||||
*/
|
11
addons/wep_javelin/CfgSounds.hpp
Normal file
11
addons/wep_javelin/CfgSounds.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
class CfgSounds {
|
||||
class ACE_Javelin_Locking {
|
||||
sound[] = {PATHTOF(data\sounds\javelin_locking.ogg), 1, 1, 200};
|
||||
titles[] = {};
|
||||
};
|
||||
class ACE_Javelin_Locked {
|
||||
sound[] = {PATHTOF(data\sounds\javelin_locked.ogg), 1, 1, 200};
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
@ -11,4 +11,5 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventhandlers.hpp"
|
||||
#include "CfgOptics.hpp"
|
||||
#include "CfgOptics.hpp"
|
||||
#include "CfgSounds.hpp"
|
@ -1,49 +1,39 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
//_this=[TEST_AI_HELICOPTER,"missiles_DAGR","missiles_DAGR","Far_AI","M_PG_AT","24Rnd_PG_missiles",163988: rocket_01_fly_f.p3d]
|
||||
TRACE_1("enter", _this);
|
||||
TRACE_1("Launch", _this);
|
||||
PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||
|
||||
FUNC(guidance_Javelin_LOBL_HI_PFH) = {
|
||||
TRACE_1("enter", _this);
|
||||
private["_pitch", "_yaw", "_wentTerminal", "_target", "_targetPos", "_curVelocity", "_missile" ];
|
||||
private["_pitch", "_yaw", "_wentTerminal", "_target", "_targetPos", "_curVelocity", "_missile", "_launchPos", "_targetStartPos" ];
|
||||
_args = _this select 0;
|
||||
//PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||
_shooter = _args select 0;
|
||||
_missile = _args select 6;
|
||||
|
||||
if((count _this) > 2) then {
|
||||
_wentTerminal = _this select 2;
|
||||
if((count _args) > 7) then {
|
||||
_saveArgs = _args select 7;
|
||||
_target = _saveArgs select 0;
|
||||
_targetStartPos = _saveArgs select 1;
|
||||
_launchPos = _saveArgs select 2;
|
||||
_wentTerminal = _saveArgs select 3;
|
||||
} else {
|
||||
_this set[2, false];
|
||||
_wentTerminal = false;
|
||||
};
|
||||
|
||||
if((count _this) > 3) then {
|
||||
_targets = _this select 3;
|
||||
_target = _targets select 0;
|
||||
_targetPos = _targets select 1;
|
||||
} else {
|
||||
_this set[3, [GVAR(currentTarget),GVAR(currentTargetPos)] ];
|
||||
_wentTerminal = false;
|
||||
_launchPos = getPosASL _shooter;
|
||||
_target = GVAR(currentTarget);
|
||||
_targetPos = GVAR(currentTargetPos);
|
||||
_targetStartPos = GVAR(currentTargetPos);
|
||||
};
|
||||
|
||||
_targetPos = getPosASL _target;
|
||||
_curVelocity = velocity _missile;
|
||||
|
||||
TRACE_4("", _target, _targetPos, _launchPos, _targetStartPos);
|
||||
|
||||
if(!alive _missile || isNull _missile) exitWith {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
||||
_launchPos = _shooter getVariable [QGVAR(launchPos), nil];
|
||||
if(isNil "_launchPos") then {
|
||||
TRACE_1("Setting launch parameters", "");
|
||||
_launchPos = getPosASL _shooter;
|
||||
_shooter setVariable [QGVAR(launchPos), _launchPos, false];
|
||||
_shooter setVariable [QGVAR(launchTime), diag_tickTime, false];
|
||||
};
|
||||
|
||||
|
||||
_addHeight = [0,0,0];
|
||||
if(!isNil "_target") then {
|
||||
|
||||
@ -58,10 +48,10 @@ FUNC(guidance_Javelin_LOBL_HI_PFH) = {
|
||||
if((count _targetPos) > 0) then {
|
||||
_distanceToTarget = [(_missilePos select 0), (_missilePos select 1), (_targetPos select 2)] vectorDistance _targetPos;
|
||||
|
||||
_defPitch = 0.25;
|
||||
|
||||
if( (_missilePos select 2) < (_targetPos select 2) + 160 && !_wentTerminal) then {
|
||||
_addHeight = [0,0,(_targetPos select 2) + ( (_distanceToTarget * 2) + 160)];
|
||||
|
||||
if( (_missilePos select 2) < (_targetPos select 2) + 200 && !_wentTerminal) then {
|
||||
_addHeight = [0,0,(_targetPos select 2) + ( (_distanceToTarget * 2) + 200)];
|
||||
TRACE_1("Climb phase", _addHeight);
|
||||
} else {
|
||||
_wentTerminal = true;
|
||||
@ -70,7 +60,8 @@ FUNC(guidance_Javelin_LOBL_HI_PFH) = {
|
||||
};
|
||||
_targetPos = _targetPos vectorAdd _addHeight;
|
||||
|
||||
_defYaw = 0.0035;
|
||||
_defPitch = 0.25;
|
||||
_defYaw = 0.035;
|
||||
|
||||
_targetVectorSeeker = [_missile, [_xVec, _yVec, _zVec], _targetPos] call FUNC(translateToWeaponSpace);
|
||||
_yaw = 0.0;
|
||||
@ -104,11 +95,6 @@ FUNC(guidance_Javelin_LOBL_HI_PFH) = {
|
||||
|
||||
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,1,1], ASLtoATL _missilePos, 0.75, 0.75, 0, str _vectorTo, 1, 0.025, "TahomaB"];
|
||||
drawLine3D [ASLtoATL _missilePos, ASLtoATL _targetPos, [1,0,0,1]];
|
||||
|
||||
_distance = ([getPos startPos, _missilePos] call BIS_fnc_distance2D);
|
||||
_marker = createMarkerLocal [format["m%1", MARKERCOUNT], [_distance, _missilePos select 2]];
|
||||
_marker setMarkerTypeLocal "mil_dot";
|
||||
_marker setMarkerColorLocal "ColorRed";
|
||||
|
||||
MARKERCOUNT = MARKERCOUNT + 1;
|
||||
#endif
|
||||
@ -127,6 +113,10 @@ FUNC(guidance_Javelin_LOBL_HI_PFH) = {
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
_saveArgs = [_target,_targetStartPos, _launchPos, _wentTerminal];
|
||||
_args set[7, _saveArgs ];
|
||||
_this set[0, _args];
|
||||
};
|
||||
|
||||
FUNC(guidance_Javelin_LOBL_HI) = {
|
||||
|
Loading…
Reference in New Issue
Block a user