ACE3/addons/medical_treatment/functions/fnc_placeInGrave.sqf
BrettMayson 66deb59037
Medical Treatment - Add event and setting for grave creation (#9441)
graves: event and setting for markers

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-10-01 14:31:38 -04:00

36 lines
897 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Glowbal, drofseh
* Places a dead body inside a grave.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject] call ace_medical_treatment_fnc_placeInGrave
*
* Public: No
*/
params ["_medic", "_patient"];
TRACE_1("placeInGrave",_patient);
if ((alive _patient) && {GVAR(allowGraveDigging) < 2}) exitWith {
[LSTRING(bodybagWhileStillAlive)] call EFUNC(common,displayTextStructured);
};
private _graveClassname = "";
if (GVAR(graveDiggingMarker)) then {
_graveClassname = missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"];
};
private _graveRotation = missionNameSpace getVariable [QGVAR(graveRotation), 0];
["ace_placedInGrave",
[_this, _graveClassname, [0,0,0], _graveRotation] call FUNC(placeInBodyBagOrGrave)
] call CBA_fnc_globalEvent;