Added check to addEarplugs if earplugs are used

This commit is contained in:
jonpas 2015-06-28 21:25:01 +02:00
parent f52babe546
commit 9e6ce52fb6

View File

@ -15,9 +15,12 @@
*/
#include "script_component.hpp"
private ["_unit", "_launcher"];
PARAMS_1(_unit);
_unit = _this select 0;
// Exit if soldier has earplugs already in (persistence scenarios)
if (FUNC(hasEarPlugsIn)) exitWith {};
private ["_launcher"];
// add earplugs if the soldier has a rocket launcher
_launcher = secondaryWeapon _unit;