mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Grenades - Fix unconscious AI being affected by flashbangs (#9978)
* Stop players being affected by AI flashbang code * Stop affecting unconscious AI * Update fnc_flashbangExplosionEH.sqf
This commit is contained in:
parent
7c4f4cf8f8
commit
0f5b7c8762
@ -41,12 +41,12 @@ if (hasInterface) then {
|
||||
}, [_light], 0.1] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
|
||||
// Affect local AI
|
||||
// Affect local AI (players are not local, except for ACE_player)
|
||||
// @todo: Affect units in static weapons, turned out, etc
|
||||
private _affected = (ASLtoAGL _grenadePosASL) nearEntities ["CAManBase", 20];
|
||||
_affected = _affected - [ACE_player];
|
||||
{
|
||||
if (local _x && {alive _x}) then {
|
||||
if (local _x && {_x call EFUNC(common,isAwake)}) then {
|
||||
private _unit = _x;
|
||||
private _strength = 1 - (((eyePos _unit) vectorDistance _grenadePosASL) min 20) / 20;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user