From 9ffca544a6450798644a1a96e9a439870f012e84 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 11 Aug 2019 17:59:05 -0500 Subject: [PATCH] Advanced Throwing - Call muzzle EH and fix RHS inheritance (Compat with RHS 0.4.9) (#6879) * Advanced Throwing - Call muzzle EH and fix RHS inheritance * UBC for rhs --- .../functions/fnc_throwFiredXEH.sqf | 5 +++++ optionals/compat_rhs_afrf3/CfgAmmo.hpp | 20 +++---------------- optionals/compat_rhs_afrf3/CfgWeapons.hpp | 2 +- optionals/compat_rhs_usf3/CfgMagazines.hpp | 2 +- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/addons/advanced_throwing/functions/fnc_throwFiredXEH.sqf b/addons/advanced_throwing/functions/fnc_throwFiredXEH.sqf index 80dbc2f973..5461d5d010 100644 --- a/addons/advanced_throwing/functions/fnc_throwFiredXEH.sqf +++ b/addons/advanced_throwing/functions/fnc_throwFiredXEH.sqf @@ -26,3 +26,8 @@ TRACE_1("Fired",_this); { _this call _x; } forEach ((_this select 0) getVariable "cba_xeh_fired"); + +// Call muzzle fired EH +{ + _this call compile getText (_x >> "fired"); +} forEach (configProperties [configFile >> "CfgWeapons" >> "Throw" >> (_this select 2) >> "EventHandlers", "isClass _x", true]); diff --git a/optionals/compat_rhs_afrf3/CfgAmmo.hpp b/optionals/compat_rhs_afrf3/CfgAmmo.hpp index deebfe92ef..1af1a2bcab 100644 --- a/optionals/compat_rhs_afrf3/CfgAmmo.hpp +++ b/optionals/compat_rhs_afrf3/CfgAmmo.hpp @@ -153,25 +153,11 @@ class CfgAmmo { ace_frag_skip = 0; ace_frag_force = 1; }; - class rhs_ammo_rgn_base: rhs_ammo_rgd5 { - ace_frag_enabled = 1; - ace_frag_metal = 193; - ace_frag_charge = 97; - ace_frag_gurney_c = 2800; - ace_frag_gurney_k = "3/5"; - ace_frag_classes[] = {"ACE_frag_tiny_HD"}; - ace_frag_skip = 0; - ace_frag_force = 1; - }; - class rhs_ammo_rgn: rhs_ammo_rgn_base { - // RGN is scripted grenade that deletes itself, which will break advanced throwing, replace with it's base - ace_advanced_throwing_replaceWith = "rhs_ammo_rgn_base"; + class rhs_ammo_rgn: rhs_ammo_rgd5 { ace_frag_enabled = 0; ace_frag_skip = 1; ace_frag_force = 0; }; - class rhs_ammo_rgn_sub: rhs_ammo_rgn_base {}; - class rhs_ammo_rgn_exp: rhs_ammo_rgn_base {}; class rhs_ammo_fakel: GrenadeHand { ace_frag_enabled = 0; ace_frag_skip = 1; @@ -205,7 +191,7 @@ class CfgAmmo { ace_frag_skip = 1; ace_frag_force = 0; }; - + class G_40mm_HE; class rhs_g_vog25: G_40mm_HE {}; class rhs_g_vg40tb: rhs_g_vog25 { //Thermobaric @@ -220,5 +206,5 @@ class CfgAmmo { class rhs_g_vg40md_white: rhs_g_vog25 { //Smoke ace_frag_force = 0; }; - + }; diff --git a/optionals/compat_rhs_afrf3/CfgWeapons.hpp b/optionals/compat_rhs_afrf3/CfgWeapons.hpp index b654aa0f66..c688462068 100644 --- a/optionals/compat_rhs_afrf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_afrf3/CfgWeapons.hpp @@ -85,7 +85,7 @@ class CfgWeapons { ACE_ScopeAdjust_VerticalIncrement = 0.5; ACE_ScopeAdjust_HorizontalIncrement = 0.5; }; - class rhs_acc_pso1m21: rhs_acc_sniper_base { + class rhs_acc_pso1m21: rhs_acc_pso1m2 { ACE_ScopeHeightAboveRail = 7.75566; ACE_ScopeAdjust_Vertical[] = {0, 0}; ACE_ScopeAdjust_Horizontal[] = {-10, 10}; diff --git a/optionals/compat_rhs_usf3/CfgMagazines.hpp b/optionals/compat_rhs_usf3/CfgMagazines.hpp index a6a2db402b..61d6493079 100644 --- a/optionals/compat_rhs_usf3/CfgMagazines.hpp +++ b/optionals/compat_rhs_usf3/CfgMagazines.hpp @@ -69,7 +69,7 @@ class cfgMagazines { }; }; - class rhsusf_m112x4_mag: CA_Magazine { + class rhsusf_m112x4_mag: rhsusf_m112_mag { ace_explosives_DelayTime = 1; ace_explosives_Placeable = 1; ace_explosives_SetupObject = "ACE_Explosives_Place_rhsusf_m112x4_DemoCharge";