Skip to content

Commit 40e84ca

Browse files
authored
Grenades - Add ace_grenades_fnc_altFlashbangInit for GL launched (#11398)
* Grenades - Add `ace_grenades_fnc_altFlashbangInit` for GL launched flashbangs * use `getShotInfo`
1 parent 97a09f8 commit 40e84ca

4 files changed

Lines changed: 28 additions & 2 deletions

File tree

addons/fire/functions/fnc_addScreamSounds.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121

2222
params [["_unitClass", "", [""]], ["_screams", [], [[]]], ["_append", true, [false]]];
23-
TRACE_3("fnc_addScreamSounds",_unitClass,_screams,_overwrite);
23+
TRACE_3("fnc_addScreamSounds",_unitClass,_screams,_append);
2424

2525
if (_unitClass == "" || _screams isEqualTo [] || !(_unitClass isKindOf "CAManBase")) exitWith { false };
2626

addons/grenades/XEH_PREP.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
PREP(addChangeFuseItemContextMenuOptions);
2+
PREP(altFlashbangInit);
23
PREP(damageEngineAndWheels);
34
PREP(flare);
45
PREP(flashbangExplosionEH);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "..\script_component.hpp"
2+
/*
3+
* Author: PabstMirror
4+
* Create flashbang effect on ammo explode, should be called from ammo init EH
5+
*
6+
* Arguments:
7+
* 0: Flashbang grenade <OBJECT>
8+
*
9+
* Return Value:
10+
* None
11+
*
12+
* Example:
13+
* [cursorObject] call ace_grenades_fnc_altFlashbangInit
14+
*
15+
* Public: No
16+
*/
17+
18+
params ["_ammo"];
19+
if (isNull _ammo || {!(_ammo getShotInfo 5)}) exitWith {};
20+
21+
_ammo addEventHandler ["Explode", {
22+
params ["_projectile"];
23+
TRACE_1("altFlashbangInit explode",_projectile);
24+
[_projectile] call FUNC(flashbangThrownFuze); // calls global event
25+
}];

addons/milr/functions/fnc_getRange.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* 0: Player <OBJECT>
88
*
99
* Return Value:
10-
* None
10+
* Distance (or error code) <NUMBER>
1111
*
1212
* Example:
1313
* [player] call ace_milr_fnc_getRange

0 commit comments

Comments
 (0)