mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Apply javelin guidance to static titans.
This commit is contained in:
parent
3d7ae5e3a1
commit
ce4a9c3676
29
addons/javelin/CfgVehicles.hpp
Normal file
29
addons/javelin/CfgVehicles.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
class CfgVehicles {
|
||||
class LandVehicle;
|
||||
class StaticWeapon : LandVehicle {
|
||||
class Turrets;
|
||||
};
|
||||
|
||||
class StaticMGWeapon : StaticWeapon {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class AT_01_base_F: StaticMGWeapon {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret : MainTurret {
|
||||
turretInfoType = "ACE_RscOptics_javelin";
|
||||
gunnerOpticsModel = PATHTOF(data\reticle_titan.p3d);
|
||||
opticsZoomMin = 0.08333;
|
||||
opticsZoomMax = 0.04167;
|
||||
opticsZoomInit = 0.08333;
|
||||
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
|
||||
opticsFlare = 0;
|
||||
discretefov[] = {0.08333,0.04167};
|
||||
discreteInitIndex = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,14 +1,26 @@
|
||||
class CfgWeapons {
|
||||
class Launcher;
|
||||
class MissileLauncher;
|
||||
|
||||
class Launcher_Base_F : Launcher {
|
||||
class WeaponSlotsInfo;
|
||||
};
|
||||
|
||||
class missiles_titan : MissileLauncher {
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = PATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
|
||||
class launch_Titan_base : Launcher_Base_F {
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = PATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 1;
|
||||
canLock = 0;
|
||||
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
|
@ -13,4 +13,5 @@ class CfgPatches {
|
||||
#include "CfgEventhandlers.hpp"
|
||||
#include "RscInGameUI.hpp"
|
||||
#include "CfgSounds.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgVehicles.hpp"
|
@ -6,7 +6,10 @@ PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||
// Bail on not missile
|
||||
if( _shooter != ACE_player) exitWith { false };
|
||||
|
||||
if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_base"] call EFUNC(common,inheritsFrom)) ) exitWith { };
|
||||
if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_base"] call EFUNC(common,inheritsFrom))
|
||||
&&
|
||||
{ ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "missiles_titan"] call EFUNC(common,inheritsFrom)) }
|
||||
) exitWith { };
|
||||
|
||||
_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil];
|
||||
if(!isNil "_pfh_handle") then {
|
||||
|
@ -30,7 +30,10 @@ _soundTime = _args select 4;
|
||||
_randomLockInterval = _args select 5;
|
||||
_fireDisabledEH = _args select 6;
|
||||
|
||||
if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_base"] call EFUNC(common,inheritsFrom)) ) exitWith {
|
||||
if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_base"] call EFUNC(common,inheritsFrom))
|
||||
&&
|
||||
{ ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "missiles_titan"] call EFUNC(common,inheritsFrom)) }
|
||||
) exitWith {
|
||||
__JavelinIGUITargeting ctrlShow false;
|
||||
__JavelinIGUITargetingGate ctrlShow false;
|
||||
__JavelinIGUITargetingLines ctrlShow false;
|
||||
@ -55,8 +58,16 @@ if ((velocity ACE_player) distance [0,0,0] > 0.5 && {cameraView == "GUNNER"} &&
|
||||
|
||||
|
||||
// bail on not loaded
|
||||
if (ACE_player ammo (currentWeapon ACE_player) == 0) exitWith { };
|
||||
|
||||
if( (vehicle ACE_player) != ACE_player) then {
|
||||
if( (vehicle player) magazineTurretAmmo ["1Rnd_GAT_missiles", [0]] < 1) exitWith {
|
||||
TRACE_1("No turret ammo, exit", "");
|
||||
};
|
||||
} else {
|
||||
if (ACE_player ammo (currentWeapon ACE_player) < 1 ) exitWith {
|
||||
TRACE_1("No ammo, exit", "");
|
||||
};
|
||||
};
|
||||
|
||||
_range = parseNumber (ctrlText __JavelinIGUIRangefinder);
|
||||
TRACE_1("Viewing range", _range);
|
||||
if (_range > 50 && {_range < 2500}) then {
|
||||
@ -144,6 +155,8 @@ if (isNull _newTarget) then {
|
||||
// Disallow fire
|
||||
_fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire);
|
||||
} else {
|
||||
_fov = [] call CBA_fnc_getFoV;
|
||||
TRACE_1("FOV", _fov);
|
||||
if (_newTarget distance ACE_player < 2500
|
||||
&& {(call CBA_fnc_getFoV) select 1 > 9}
|
||||
&& { (currentVisionMode ACE_player == 2)}
|
||||
|
@ -105,8 +105,9 @@ class CfgAmmo {
|
||||
// Turn off arma crosshair-guidance
|
||||
manualControl = 0;
|
||||
|
||||
hit = 1400;
|
||||
|
||||
hit = 1400; // default: 800
|
||||
indirectHit = 20;
|
||||
indirectHitRange = 2;
|
||||
// ACE uses these values
|
||||
//trackOversteer = 1;
|
||||
//trackLead = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user