From 65a0a541d18b187392dc8c66a0817254bb2dfae4 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 29 May 2017 00:33:48 -0500 Subject: [PATCH] AdvThrow - Handle bugged currentThrowable --- addons/advanced_throwing/functions/fnc_drawThrowable.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf index 226519b931a..b4155ecfcd3 100644 --- a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf +++ b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf @@ -36,6 +36,11 @@ if (_throwable isEqualTo [] && {!_primed}) exitWith { private _throwableMag = _throwable param [0, "#none"]; +// If not primed, double check we actually have the magazine in inventory +if ((!_primed) && {!(_throwableMag in (magazines ACE_player))}) exitWith { + [ACE_player, "No valid throwable (glitched currentThrowable)"] call FUNC(exitThrowMode); +}; + // Get correct throw power for primed grenade if (_primed) then { private _ammoType = typeOf _activeThrowable;