mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
28 lines
608 B
Plaintext
28 lines
608 B
Plaintext
|
/*
|
||
|
* 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 {
|
||
|
ACE_LOGERROR("Unit not local or null");
|
||
|
};
|
||
|
|
||
|
_unit setVariable [GVAR(isInPain), _isInPain, true];
|
||
|
|
||
|
[_unit, "Arms", _unit getHitPointDamage "HitHands" >= DAMAGED_MIN_THRESHOLD] call FUNC(damageBodyPart);
|