diff --git a/addons/mk6mortar/XEH_PREP.hpp b/addons/mk6mortar/XEH_PREP.hpp index e0fc750816..dd052a993e 100644 --- a/addons/mk6mortar/XEH_PREP.hpp +++ b/addons/mk6mortar/XEH_PREP.hpp @@ -3,5 +3,7 @@ PREP(csw_getProxyWeapon); PREP(handleFired); PREP(handlePlayerVehicleChanged); PREP(moduleInit); +PREP(rangeTableCanUse); +PREP(rangeTableOpen); PREP(toggleMils); PREP(turretDisplayLoaded); diff --git a/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf b/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf new file mode 100644 index 0000000000..081ff78937 --- /dev/null +++ b/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror + * Can player open 82mm rangetable. + * + * Arguments: + * 0: Vehicle + * 1: Player + * + * Return Value: + * Can Open + * + * Example: + * [bob, bob] call ace_mk6mortar_fnc_rangeTableCanUse + * + * Public: No + */ + +params ["_vehicle", "_player"]; + +"ACE_RangeTable_82mm" in (_player call EFUNC(common,uniqueItems)); \ No newline at end of file diff --git a/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf b/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf new file mode 100644 index 0000000000..56ef6a32c5 --- /dev/null +++ b/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror + * Opens the rangetable and fills the charge listbox. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_mk6mortar_fnc_rangeTableOpen + * + * Public: No + */ + +TRACE_1("rangeTableOpen - defer to artillerytables",_this); + +["mortar_82mm", 45, 88, GVAR(airResistanceEnabled) || EGVAR(artillerytables,advancedCorrections)] call EFUNC(artillerytables,rangeTableOpen);