mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
36f2c5fcc9
* Minor code clean up * refactor(medical): shorten some code * refactor(medical): use macros for tourniquets * refactor(medical): pull cache expiry values into script_macros_medical
25 lines
535 B
Plaintext
25 lines
535 B
Plaintext
/*
|
|
* Author: KoffeinFlummi
|
|
* Checks if a unit is in a medical vehicle.
|
|
*
|
|
* Arguments:
|
|
* 0: unit to be checked <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Is unit in medical vehicle? <BOOL>
|
|
*
|
|
* Example:
|
|
* [player] call ace_medical_treatment_fnc_isInMedicalVehicle
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit"];
|
|
private _vehicle = vehicle _unit;
|
|
|
|
if (_unit == _vehicle) exitWith {false};
|
|
if (_unit in [driver _vehicle, gunner _vehicle, commander _vehicle]) exitWith {false};
|
|
|
|
[_vehicle] call FUNC(isMedicalVehicle);
|