Merge pull request #926 from acemod/guidanceClassFixes

Limit Titan & Javelin optic configs to only those weapons and disable inheritance for LAZY MOD MAKERS
This commit is contained in:
jaynus 2015-05-01 07:00:08 -07:00
commit ce6e59b25e
5 changed files with 91 additions and 10 deletions

View File

@ -9,12 +9,48 @@ class CfgVehicles {
class MainTurret;
};
};
class AT_01_base_F: StaticMGWeapon {};
class AT_01_base_F: StaticMGWeapon {
class B_static_AT_F: AT_01_base_F {
class Turrets : Turrets {
class MainTurret : MainTurret {
weapons[] = { "missiles_titan_static_at" };
weapons[] = { QGVAR(Titan_Static) };
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
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;
};
};
};
class O_static_AT_F: AT_01_base_F {
class Turrets : Turrets {
class MainTurret : MainTurret {
weapons[] = { QGVAR(Titan_Static) };
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
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;
};
};
};
class I_static_AT_F: AT_01_base_F {
class Turrets : Turrets {
class MainTurret : MainTurret {
weapons[] = { QGVAR(Titan_Static) };
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
turretInfoType = "ACE_RscOptics_javelin";

View File

@ -11,7 +11,9 @@ class CfgWeapons {
};
class missiles_titan_at : missiles_titan {
class missiles_titan_at : missiles_titan { };
class GVAR(Titan_Static) : missiles_titan_at {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
@ -20,18 +22,50 @@ class CfgWeapons {
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
class missiles_titan_static_at : missiles_titan_at { };
// @TODO: AA by default, motherfuckers
class launch_Titan_base : Launcher_Base_F {};
class launch_Titan_short_base : launch_Titan_base {
class launch_Titan_short_base : launch_Titan_base { };
class launch_B_Titan_short_F: launch_Titan_short_base {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
canLock = 0;
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
class launch_I_Titan_short_F: launch_Titan_short_base {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
canLock = 0;
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
class launch_O_Titan_short_F: launch_Titan_short_base {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
canLock = 0;
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
class launch_Titan_short_F: launch_Titan_short_base {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
canLock = 0;
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};

View File

@ -6,10 +6,15 @@ 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_short_base"] call EFUNC(common,inheritsFrom))
&&
{ ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "missiles_titan_at"] call EFUNC(common,inheritsFrom)) }
) exitWith { };
*/
_configs = configProperties [configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) >> QGVAR(enabled), "true", false];
if( (count _configs) < 1) exitWith {};
_config = _configs select 1;
_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil];
if(!isNil "_pfh_handle") then {

View File

@ -35,10 +35,14 @@ _soundTime = _args select 4;
_randomLockInterval = _args select 5;
_fireDisabledEH = _args select 6;
_configs = configProperties [configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) >> QGVAR(enabled), "true", false];
/*
if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_short_base"] call EFUNC(common,inheritsFrom))
&&
{ ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "missiles_titan_at"] call EFUNC(common,inheritsFrom)) }
) exitWith {
*/
if((count _config) < 1) exitWith {
__JavelinIGUITargeting ctrlShow false;
__JavelinIGUITargetingGate ctrlShow false;
__JavelinIGUITargetingLines ctrlShow false;
@ -130,7 +134,7 @@ FUNC(disableFire) = {
if(_firedEH < 0 && difficulty > 0) then {
_firedEH = [ACE_player, "DefaultAction", {true}, {
_canFire = (_this select 0) getVariable["ace_missileguidance_target", nil];
_canFire = (_this select 1) getVariable["ace_missileguidance_target", nil];
if(!isNil "_canFire") exitWith { false };
true
}] call EFUNC(common,addActionEventHandler);

View File

@ -7,7 +7,7 @@ if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false };
if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false };
private["_config", "_enabled", "_target", "_seekerType", "_attackProfile"];
private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"];
private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"];
PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
@ -15,7 +15,9 @@ PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
// Bail on not missile
if(! (_ammo isKindOf "MissileBase") ) exitWith { false };
_config = configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON);
_configs = configProperties [configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON), "true", false];
if( (count _configs) < 1) exitWith {};
_config = (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON));
_enabled = getNumber ( _config >> "enabled");
// Bail if guidance is not enabled