mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
4466f9e785
* Move litter to `treatment` * Move eden object attributes to `treatment` * Move treatment items to `treatment` * Move bodybag handling to `treatment` * Move state conditions to `statemachine` * Move radio addon handling to `feedback` * Move medical macros to `engine` * Move medical extension to `damage` * Fix texture and material paths after move * Remove duplicate medical menu config * Remove old faction class * Remove a bunch of old code
35 lines
793 B
Plaintext
35 lines
793 B
Plaintext
/*
|
|
* Author: PabstMirror
|
|
* Removes corpse. Idealy it is just deleted the next frame,
|
|
* but player bodies cannot be deleted until they respawn, so it is hidden and deleted later.
|
|
*
|
|
* Arguments:
|
|
* 0: Mr Body <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [cursorTarget] call ace_medical_fnc_serverRemoveBody
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params ["_target"];
|
|
TRACE_2("",_target,isPlayer _target);
|
|
|
|
// Hide the body globaly
|
|
[QEGVAR(common,hideObjectGlobal), [_target, true]] call CBA_fnc_serverEvent;
|
|
|
|
if (isNil QGVAR(bodiesToDelete)) then {GVAR(bodiesToDelete) = [];};
|
|
GVAR(bodiesToDelete) pushBack _target;
|
|
|
|
// Start up a loop to wait for bodies to be free to delete
|
|
if ((count GVAR(bodiesToDelete)) == 1) then {
|
|
[] call FUNC(bodyCleanupLoop);
|
|
};
|
|
|
|
nil
|