ACE3/addons/medical_engine/functions/fnc_setPainSway.sqf

28 lines
601 B
Plaintext
Raw Normal View History

2016-09-30 09:52:05 +00:00
/*
* Author: commy2
* Updates weapon sway caused by pain.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: In pain (optional, default: true) <BOOLEAN>
*
* Return Value:
* None
*
* Example:
* [player, true] call ace_medical_engine_fnc_setPainSway
*
* Public: No
*/
#include "script_component.hpp"
params [["_unit", objNull, [objNull]], ["_isInPain", true, [false]]];
if (!local _unit) exitWith {
2016-10-02 15:50:17 +00:00
ERROR("Unit not local or null");
2016-09-30 09:52:05 +00:00
};
_unit setVariable [GVAR(isInPain), _isInPain, true];
[_unit, "Arms", _unit getHitPointDamage "HitHands" >= DAMAGED_MIN_THRESHOLD] call FUNC(damageBodyPart);