mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
31 lines
780 B
Plaintext
31 lines
780 B
Plaintext
/**
|
|
* fn_assignAirwayStatus.sqf
|
|
* @Descr: N/A
|
|
* @Author: Glowbal
|
|
*
|
|
* @Arguments: []
|
|
* @Return:
|
|
* @PublicAPI: false
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage", "_bodyPartn"];
|
|
_unit = _this select 0;
|
|
_selectionName = _this select 1;
|
|
_amountOfDamage = _this select 2;
|
|
_sourceOfDamage = _this select 3;
|
|
_typeOfDamage = _this select 4;
|
|
_bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
|
|
|
|
// We process only the head for airway.
|
|
if (_bodyPartn != 0) exitwith {};
|
|
|
|
if (_amountOfDamage > 0.4) then {
|
|
if (random(1) >= 0.8) then {
|
|
if !(_unit getvariable[QGVAR(airwayCollapsed), false]) then {
|
|
_unit setvariable [QGVAR(airwayCollapsed), true, true];
|
|
};
|
|
};
|
|
};
|