diff --git a/addons/advanced_throwing/CfgAmmo.hpp b/addons/advanced_throwing/CfgAmmo.hpp index 9bcf6c37d8..51f5d08a31 100644 --- a/addons/advanced_throwing/CfgAmmo.hpp +++ b/addons/advanced_throwing/CfgAmmo.hpp @@ -4,4 +4,8 @@ class CfgAmmo { GVAR(torqueDirection)[] = {1, 1, 0}; GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]"; }; + class GrenadeCore: Default { + GVAR(torqueDirection)[] = {1, 1, 0}; + GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]"; + }; }; diff --git a/addons/advanced_throwing/functions/fnc_throw.sqf b/addons/advanced_throwing/functions/fnc_throw.sqf index b7019b49dd..cf4086229d 100644 --- a/addons/advanced_throwing/functions/fnc_throw.sqf +++ b/addons/advanced_throwing/functions/fnc_throw.sqf @@ -50,7 +50,8 @@ if (!(_unit getVariable [QGVAR(primed), false])) then { }; private _config = configFile >> "CfgAmmo" >> typeOf _activeThrowable; - private _torqueDir = vectorNormalized (getArray (_config >> QGVAR(torqueDirection))); + private _torqueDir = getArray (_config >> QGVAR(torqueDirection)); + _torqueDir = if (_torqueDir isEqualTypeArray [0,0,0]) then { vectorNormalized _torqueDir } else { [0,0,0] }; private _torqueMag = getNumber (_config >> QGVAR(torqueMagnitude)); private _torque = _torqueDir vectorMultiply _torqueMag;