ACE3/addons/medical/functions/fnc_requestWoundSync.sqf
2016-05-24 14:13:11 +01:00

23 lines
607 B
Plaintext

/*
* Author: Glowbal
* Ask for the latest wound information.
*
* Arguments:
* 0: The target <OBJECT>
* 1: object belonging to the caller <OBJECT>
*
* ReturnValue:
* None
*
* Public: Yes
*/
#include "script_component.hpp"
params [ "_target", "_caller"];
if (local _target || GVAR(level) < 2) exitWith {}; // if the target is local, we already got the most update to date information
if (_target getVariable [QGVAR(isWoundSynced), false]) exitWith {};
_target setVariable [QGVAR(isWoundSynced), true];
["ace_medical_woundUpdateRequest", [_target, _caller], [_target]] call CBA_fnc_targetEvent;