diff --git a/addons/dragon/CfgAmmo.hpp b/addons/dragon/CfgAmmo.hpp index b293cb58e3..d42947f94e 100644 --- a/addons/dragon/CfgAmmo.hpp +++ b/addons/dragon/CfgAmmo.hpp @@ -66,17 +66,18 @@ class CfgAmmo { }; class GVAR(super) : GVAR(dragonBase) { + EGVAR(frag,skip) = 1; scope = 1; aiAmmoUsageFlags = "128+512"; - hit = 460; + hit = 100; indirectHit = 9; indirectHitRange = 1; - explosive = 0.02; - cost = 4000; + explosive = 0.8; + cost = 500; submunitionAmmo = QGVAR(penetrator_super); submunitionDirectionType = "SubmunitionModelDirection"; - submunitionInitSpeed = 200; + submunitionInitSpeed = 1000; submunitionParentSpeedCoef = 0; submunitionInitialOffset[] = { 0, 0, -0.2 }; @@ -111,7 +112,7 @@ class CfgAmmo { }; class ShellBase; - class ace_m47_dragon_serviceCharge : ShellBase { + class GVAR(serviceCharge) : ShellBase { hit = 1; indirectHit = 2; indirectHitRange = 1; diff --git a/addons/dragon/CfgVehicles.hpp b/addons/dragon/CfgVehicles.hpp index ac3fc93310..9254dcbae4 100644 --- a/addons/dragon/CfgVehicles.hpp +++ b/addons/dragon/CfgVehicles.hpp @@ -136,8 +136,8 @@ class CfgVehicles { class ACE_CSW { disassembleTo = QGVAR(super); }; - - class ACE_Actions { + + class ACE_Actions { class ACE_MainActions { displayName = CSTRING(dragonName); selection = ""; diff --git a/addons/dragon/data/M47.rvmat b/addons/dragon/data/M47.rvmat index fd60778cf4..266bf40cc4 100644 --- a/addons/dragon/data/M47.rvmat +++ b/addons/dragon/data/M47.rvmat @@ -1,6 +1,5 @@ -class StageTI -{ - texture="z\ace\addons\dragon\data\M47_TI_CA.tga"; +class StageTI { + texture="z\ace\addons\dragon\data\M47_TI_CA.tga"; }; ambient[]={0.958,0.98400003,1,1}; diffuse[]={0.958,0.98400003,1,1}; @@ -10,87 +9,73 @@ specular[]={0.153,0.169,0.111,1}; specularPower=90; PixelShaderID="Super"; VertexShaderID="Super"; -class Stage1 -{ - texture="z\ace\addons\dragon\data\M47_nohq.tga"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; +class Stage1 { + texture="z\ace\addons\dragon\data\M47_nohq.tga"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; }; -class Stage2 -{ - texture="a3\weapons_f\data\detailmaps\Metal_rough_DT.tga"; - uvSource="tex"; - class uvTransform - { - aside[]={4,0,0}; - up[]={0,4,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; +class Stage2 { + texture="a3\weapons_f\data\detailmaps\Metal_rough_DT.tga"; + uvSource="tex"; + class uvTransform { + aside[]={4,0,0}; + up[]={0,4,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; }; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; }; -class Stage4 -{ - texture="z\ace\addons\dragon\data\m47_as.tga"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; +class Stage4 { + texture="z\ace\addons\dragon\data\m47_as.tga"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; }; -class Stage5 -{ - texture="z\ace\addons\dragon\data\M47_smdi.tga"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; +class Stage5 { + texture="z\ace\addons\dragon\data\M47_smdi.tga"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; }; -class Stage6 -{ - texture="#(ai,32,128,1)fresnel(4.01,2.86)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; +class Stage6 { + texture="#(ai,32,128,1)fresnel(4.01,2.86)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; }; -class Stage7 -{ - texture="a3\data_f\env_land_co.tga"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; +class Stage7 { + texture="a3\data_f\env_land_co.tga"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; }; diff --git a/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf b/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf index e4f74b349e..f1fbebfc15 100644 --- a/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf +++ b/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf @@ -12,15 +12,14 @@ * Missile Aim PosASL - Unused * * Example: - * [[1,2,3], [], []] call ace_hot_fnc_attackProfile_WIRE; + * [[1,2,3], [], []] call ace_dragon_fnc_attackProfile_DRAGON; * * Public: No - * */ params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; _args params ["_firedEH", "", "", "", "_stateParams"]; _firedEH params ["_shooter","_weapon","","","","","_projectile"]; -_attackProfileStateParams params["_maxCorrectableDistance", "_wireCut", "_seekerMaxRangeSqr", "_seekerMinRangeSqr", "_wireCutSource", "_lastTime", "_serviceInterval", "_serviceChargeCount", "_serviceChargeAcceleration", "_dragonSpeed"]; +_attackProfileStateParams params ["_maxCorrectableDistance", "_wireCut", "_seekerMaxRangeSqr", "_seekerMinRangeSqr", "_wireCutSource", "_lastTime", "_serviceInterval", "_serviceChargeCount", "_serviceChargeAcceleration", "_dragonSpeed"]; private _projectilePos = getPosASL _projectile; private _distanceToProjectile = (getPosASL _shooter) vectorDistanceSqr _projectilePos; @@ -35,7 +34,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith { if (_serviceChargeCount > 0) then { _projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd ([(random 2) - 1, (random 2) - 1, random 1] vectorMultiply _serviceChargeAcceleration)); - private _charge = createVehicle ["ace_m47_dragon_serviceCharge", [0, 0, 0], [], 0, "NONE"]; + private _charge = createVehicle [QGVAR(serviceCharge), [0, 0, 0], [], 0, "NONE"]; _charge setPosASL (_projectilePos vectorAdd ((_vectorToCrosshair vectorMultiply -1) vectorMultiply 0.025)); _attackProfileStateParams set [7, _serviceChargeCount - 1]; }; @@ -58,7 +57,7 @@ if (((_lastTime - CBA_missionTime) <= 0) || {(_lastTime - CBA_missionTime) < (_s _projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd (_vectorToPos vectorMultiply _serviceChargeAcceleration)); - private _charge = createVehicle ["ace_m47_dragon_serviceCharge", [0, 0, 0], [], 0, "NONE"]; + private _charge = createVehicle [QGVAR(serviceCharge), [0, 0, 0], [], 0, "NONE"]; _charge setPosASL (_projectilePos vectorAdd ((_vectorToCrosshair vectorMultiply -1) vectorMultiply 0.025)); _attackProfileStateParams set [7, _serviceChargeCount - 1]; diff --git a/addons/dragon/functions/fnc_canDeployWeapon.sqf b/addons/dragon/functions/fnc_canDeployWeapon.sqf index 1e8f6c78bd..9c480d266d 100644 --- a/addons/dragon/functions/fnc_canDeployWeapon.sqf +++ b/addons/dragon/functions/fnc_canDeployWeapon.sqf @@ -14,7 +14,6 @@ * [vehicle player, player] call ace_dragon_fnc_canPickupTripod; * * Public: No - * */ params ["_target", "_unit"]; !(_target getVariable [QGVAR(fired), false]) && { [_target, _unit, [], binocular _unit] call EFUNC(csw,assemble_canDeployWeapon) }; diff --git a/addons/dragon/functions/fnc_canPickupTripod.sqf b/addons/dragon/functions/fnc_canPickupTripod.sqf index efab32903d..f7e3146578 100644 --- a/addons/dragon/functions/fnc_canPickupTripod.sqf +++ b/addons/dragon/functions/fnc_canPickupTripod.sqf @@ -14,7 +14,6 @@ * [vehicle player, player] call ace_dragon_fnc_canPickupTripod; * * Public: No - * */ params ["_target", "_unit"]; !(_target getVariable [QGVAR(fired), false]) && { [_target, _unit] call EFUNC(csw,assemble_canPickupTripod) }; diff --git a/addons/dragon/functions/fnc_onDisassemble.sqf b/addons/dragon/functions/fnc_onDisassemble.sqf index 44730a3a44..b7e18ec92b 100644 --- a/addons/dragon/functions/fnc_onDisassemble.sqf +++ b/addons/dragon/functions/fnc_onDisassemble.sqf @@ -14,7 +14,6 @@ * [vehicle player, player] call ace_dragon_fnc_onDisassemble; * * Public: No - * */ params ["_newTripod", "_oldWeapon"]; diff --git a/addons/dragon/functions/fnc_onFired.sqf b/addons/dragon/functions/fnc_onFired.sqf index 0e33c8c9c6..a17b579a45 100644 --- a/addons/dragon/functions/fnc_onFired.sqf +++ b/addons/dragon/functions/fnc_onFired.sqf @@ -14,7 +14,6 @@ * [any, vehicle player] call ace_dragon_fnc_onFired; * * Public: No - * */ params ["_firedEH", "", "", "_seekerParams", "_stateParams"]; _firedEH params ["_shooter","_weapon","","","","","_projectile"]; diff --git a/addons/dragon/script_component.hpp b/addons/dragon/script_component.hpp index a55f2b165b..2fcba0b2d7 100644 --- a/addons/dragon/script_component.hpp +++ b/addons/dragon/script_component.hpp @@ -3,7 +3,7 @@ #include "\z\ace\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE + #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_DRAGON diff --git a/addons/hot/functions/fnc_seekerType_SACLOS.sqf b/addons/hot/functions/fnc_seekerType_SACLOS.sqf index 1f293fce5e..06245d0708 100644 --- a/addons/hot/functions/fnc_seekerType_SACLOS.sqf +++ b/addons/hot/functions/fnc_seekerType_SACLOS.sqf @@ -25,7 +25,7 @@ _seekerStateParams params ["_memoryPointGunnerOptics", "_animationSourceBody", " private _shooterPos = AGLToASL (_shooter modelToWorld(_shooter selectionPosition _memoryPointGunnerOptics)); private _projPos = getPosASL _projectile; -private _lookDirection = if !(_shooter isKindOf "CAManBase" || _shooter isKindOf "StaticWeapon") then { +private _lookDirection = if !(_shooter isKindOf "CAManBase" || {_shooter isKindOf "StaticWeapon"}) then { private _gBody = -deg(_shooter animationPhase _animationSourceBody); private _gGun = deg(_shooter animationPhase _animationSourceGun); diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index e4e01d067f..e218e27e54 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -56,7 +56,7 @@ private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStat // If we have no seeker target, then do not change anything // If there is no deflection on the missile, this cannot change and therefore is redundant. Avoid calculations for missiles without any deflection -if ((_minDeflection != 0 || _maxDeflection != 0) && { !(_profileAdjustedTargetPos isEqualTo [0,0,0]) }) then { +if ((_minDeflection != 0 || {_maxDeflection != 0}) && {!(_profileAdjustedTargetPos isEqualTo [0,0,0])}) then { private _targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos; private _adjustVector = _targetVector vectorDiff (vectorDir _projectile);