Skip to content

Commit 823cf09

Browse files
authored
Update fnc_doSmoke.sqf (#466)
Adds minor improvement to doSmoke. (more reliable)
1 parent e9db54c commit 823cf09

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

addons/main/functions/UnitAction/fnc_doSmoke.sqf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ if (_muzzle isEqualTo "") then {
5353
// select muzzle
5454
if (_muzzle isEqualTo "") exitWith {false};
5555

56-
_unit setVariable [QGVAR(currentTarget), objNull, GVAR(debug_functions)];
5756
// turn towards target
5857
if (_pos isNotEqualTo []) then {
5958
_unit doWatch _pos;
@@ -64,7 +63,12 @@ if (_pos isNotEqualTo []) then {
6463
_unit setVariable [QGVAR(currentTask), "Throwing smoke grenade", GVAR(debug_functions)];
6564

6665
// execute
67-
[BIS_fnc_fire, [_unit, _muzzle], 1] call CBA_fnc_waitAndExecute;
66+
[
67+
{
68+
params ["_unit", "_muzzle"];
69+
_unit forceWeaponFire [_muzzle, _muzzle];
70+
}, [_unit, _muzzle], 1
71+
] call CBA_fnc_waitAndExecute;
6872

6973
// end
7074
true

0 commit comments

Comments
 (0)