#1696 - Flashbangs make big boom

This commit is contained in:
PabstMirror 2015-07-10 21:39:35 -05:00
parent c27afca485
commit 040f4a92a0
3 changed files with 7 additions and 5 deletions

View File

@ -40,7 +40,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
[_unit, false] call EFUNC(common,disableAI); [_unit, false] call EFUNC(common,disableAI);
}; };
_unit setSkill (skill _unit * 50); _unit setSkill (skill _unit * 50);
}, [_x], (7 * _strength), 0.1] call EFUNC(common,waitAndExecute); //0.1 precision is fine for AI }, [_x], (7 * _strength)] call EFUNC(common,waitAndExecute);
} else { } else {
//Do effects for player //Do effects for player
// is there line of sight to the grenade? // is there line of sight to the grenade?
@ -62,7 +62,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
//Add ace_hearing ear ringing sound effect //Add ace_hearing ear ringing sound effect
if ((isClass (configFile >> "CfgPatches" >> "ACE_Hearing")) && {_strength > 0}) then { if ((isClass (configFile >> "CfgPatches" >> "ACE_Hearing")) && {_strength > 0}) then {
[_x, 0.5 + (_strength / 2)] call EFUNC(hearing,earRinging); [_x, (20 * _strength)] call EFUNC(hearing,earRinging);
}; };
// account for people looking away by slightly // account for people looking away by slightly
@ -95,7 +95,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
[{ [{
PARAMS_1(_light); PARAMS_1(_light);
deleteVehicle _light; deleteVehicle _light;
}, [_light], 0.1, 0] call EFUNC(common,waitAndExecute); }, [_light], 0.1] call EFUNC(common,waitAndExecute);
// blind player // blind player
if (_strength > 0.1) then { if (_strength > 0.1) then {
@ -113,7 +113,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
//FULLRECOVERY - end effect //FULLRECOVERY - end effect
[{ [{
GVAR(flashbangPPEffectCC) ppEffectEnable false; GVAR(flashbangPPEffectCC) ppEffectEnable false;
}, [], (17 * _strength), 0] call EFUNC(common,waitAndExecute); }, [], (17 * _strength)] call EFUNC(common,waitAndExecute);
}; };
}; };
}; };

View File

@ -68,7 +68,7 @@ if (count _weaponMagazines == 0) then {
_magazine = ""; _magazine = "";
{ {
EXPLODE_2_PVT(_x,_magazineType,_ammoType) EXPLODE_2_PVT(_x,_magazineType,_ammoType);
if (_ammoType == _ammo) exitWith { if (_ammoType == _ammo) exitWith {
_magazine = _magazineType; _magazine = _magazineType;
}; };

View File

@ -1,6 +1,8 @@
#define COMPONENT hearing #define COMPONENT hearing
#include "\z\ace\addons\main\script_mod.hpp" #include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
#ifdef DEBUG_ENABLED_HEARING #ifdef DEBUG_ENABLED_HEARING
#define DEBUG_MODE_FULL #define DEBUG_MODE_FULL
#endif #endif