mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
5ee1df424d
* Medical_ai - Optimize 'fnc_isInjured' * Laserpointer - Optimize 'fnc_onDraw' * Overheating - Skip ground detection if possible * Overheating - Replace function call with inline code * Overheating - Nest 'firedEH' abort conditions * Overheating - Remove duplicate code / Skip function call if possible * Overheating - Cache energy increment
21 lines
444 B
Plaintext
21 lines
444 B
Plaintext
/*
|
|
* Author: BaerMitUmlaut
|
|
* Checks if a unit needs treatment.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* Does unit need treatment <BOOL>
|
|
*
|
|
* Example:
|
|
* call ACE_medical_ai_fnc_isInjured
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
if !(alive _this) exitWith {false};
|
|
|
|
((_this getVariable [QEGVAR(medical,pain), 0] > 0.2) || {[_this] call EFUNC(medical,getBloodLoss) > 0 || {_this getVariable ["ACE_isUnconscious", false]}})
|