ACE3/addons/medical/functions/fnc_hasMedicalEnabled.sqf
Glowbal 808bb6d048 fixes #1195 units do not display injuries
Is caused because the system thinks medical is disabled for basic units, while this obviously is not the case.
2015-05-20 17:15:20 +02:00

22 lines
541 B
Plaintext

/**
* fn_hasMedicalEnabled.sqf
* @Descr: Check if unit has CMS enabled.
* @Author: Glowbal
*
* @Arguments: [unit OBJECT]
* @Return: BOOL
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_unit", "_medicalEnabled"];
_unit = _this select 0;
_medicalEnabled = _unit getvariable QGVAR(enableMedical);
if (isnil "_medicalEnabled") exitwith {
(((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1);
};
_medicalEnabled;