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
34 lines
830 B
Plaintext
34 lines
830 B
Plaintext
/*
|
|
* Author: Glowbal, esteldunedain
|
|
* Loop that cleans up player bodies that were replaced by bodybags
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* call ACE_medical_fnc_bodyCleanupLoop
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
{
|
|
TRACE_2("body",_x,isPlayer _x);
|
|
if ((!isNull _x) && {!isPlayer _x}) then {deleteVehicle _x};
|
|
} forEach GVAR(bodiesToDelete);
|
|
|
|
// deleteVehicle doesn't have instant results so it won't usualy be filtered until next run
|
|
GVAR(bodiesToDelete) = GVAR(bodiesToDelete) - [objNull];
|
|
|
|
// If no more bodies remain, exit the loop
|
|
if (GVAR(bodiesToDelete) isEqualTo []) exitWith {
|
|
TRACE_1("array emptied - rem PFEH",GVAR(bodiesToDelete));
|
|
};
|
|
|
|
// Schedule the loop to be executed again 20 sec later
|
|
[DFUNC(bodyCleanupLoop), [], 20] call CBA_fnc_waitAndExecute;
|