mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
3b62af6131
* Initial commit * derp * fix derp * fix derp again * don't code without coffee * damage locality is weird, bi pls fix * Update fnc_handlePunjiTrapTrigger.sqf Co-authored-by: PabstMirror <pabstmirror@gmail.com>
26 lines
688 B
Plaintext
26 lines
688 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: GhostIsSpooky
|
|
* Handler for 'detonation' of a local punji trap. Workaround for local-only ammo hit event.
|
|
*
|
|
* Arguments:
|
|
* 0: Punji trap <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [trap] call ace_compat_sog_fnc_handlePunjiTrapTrigger
|
|
*
|
|
* Public: No
|
|
*/
|
|
params ["_trap"];
|
|
if (!(["ACE_Medical"] call EFUNC(common,isModLoaded))) exitWith {};
|
|
|
|
private _radius = getNumber (configOf _trap >> "indirectHitRange");
|
|
private _affectedUnits = (_trap nearEntities ["CAManBase", _radius]);
|
|
|
|
if (_affectedUnits isEqualTo []) exitWith {};
|
|
|
|
[QGVAR(handlePunjiTrapDamage), [_trap, _affectedUnits], _affectedUnits] call CBA_fnc_targetEvent;
|