ACE3/addons/medical/functions/fnc_requestWoundSync.sqf

25 lines
663 B
Plaintext
Raw Normal View History

2015-03-22 16:04:42 +00:00
/*
* Author: Glowbal
* Ask for the latest wound information.
*
* Arguments:
* 0: The target <OBJECT>
* 1: object belonging to the caller <OBJECT>
*
* ReturnValue:
* <NIL>
*
* Public: Yes
*/
#include "script_component.hpp"
2015-04-30 06:17:26 +00:00
private [ "_target", "_caller"];
2015-03-22 16:04:42 +00:00
_target = _this select 0;
_caller = _this select 1;
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];
["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent);