Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions addons/advanced_throwing/functions/fnc_drawThrowable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ if (!_primed && {_throwable isEqualTo []}) exitWith {

_throwable params ["_throwableMag", "_muzzle"];

// If not primed, double check we actually have the magazine in inventory
// If not primed, double check we actually have the magazine in inventory (throwables includes inventory and muzzles)
// Can't use ace_common_fnc_hasMagazine, as it doesn't account for empty mags (grenade is emptied so that it can't be thrown via vanilla keybind)
if (!_primed && {!(_throwableMag in (magazines [ACE_player, true]))}) exitWith {
if (!_primed && {!(_throwableMag in (throwables [ACE_player, true] apply { _x select 0 }))}) exitWith {
[ACE_player, "No valid throwable (glitched currentThrowable)"] call FUNC(exitThrowMode);
};

Expand All @@ -52,7 +52,8 @@ if (_primed) then {

// Some throwables have different classname for magazine and ammo
// Primed magazine may be different, read speed before checking primed magazine!
private _throwSpeed = getNumber (configFile >> "CfgMagazines" >> _throwableMag >> "initSpeed");
private _throwableConfig = configFile >> "CfgMagazines" >> _throwableMag;
private _throwSpeed = getNumber (_throwableConfig >> "initSpeed");

// Reduce power of throw over shoulder and to sides
private _unitDirVisual = getDirVisual ACE_player;
Expand All @@ -67,7 +68,7 @@ ACE_player setVariable [QGVAR(throwSpeed), _throwSpeed * _power];

TRACE_5("",_phi,_power,_throwSpeed * _power,_throwableMag,ACE_player getVariable ARR_2([QGVAR(activeMuzzle),ARR_2(["",-1])]));

private _throwableType = getText (configFile >> "CfgMagazines" >> _throwableMag >> "ammo");
private _throwableType = getText (_throwableConfig >> "ammo");

if (!_primed && {!([ACE_player] call FUNC(canThrow))}) exitWith {
if (!isNull _activeThrowable) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 2.20
#define REQUIRED_VERSION 2.22
#define REQUIRED_CBA_VERSION {3,18,4}

#ifndef COMPONENT_BEAUTIFIED
Expand Down
Loading