Replace spawn with waitAndExec

This commit is contained in:
PabstMirror 2015-03-15 16:46:06 -05:00
parent 1cdc341320
commit 04412e8ba4
2 changed files with 2 additions and 8 deletions

View File

@ -24,7 +24,4 @@ _damage = _this select 1;
_strength = (_damage * 2) min 1;
if (_strength < 0.01) exitWith {};
[_unit, _strength] spawn {
sleep 0.2;
_this call FUNC(earRinging);
};
[{_this call FUNC(earRinging)}, [_unit, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);

View File

@ -56,7 +56,4 @@ _strength = _loudness - (_loudness/50 * _distance); // linear drop off
if (_strength < 0.01) exitWith {};
[_unit, _strength] spawn {
sleep 0.2;
_this call FUNC(earRinging);
};
[{_this call FUNC(earRinging)}, [_unit, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);