mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix body-bag action / cleanup
This commit is contained in:
parent
ee864b2c46
commit
b87bdfe14a
@ -2,6 +2,7 @@
|
||||
PREP(addDamageToUnit);
|
||||
PREP(addStateHandler);
|
||||
PREP(adjustPainLevel);
|
||||
PREP(bodyCleanupLoop);
|
||||
PREP(conditionCardiacArrestTimer);
|
||||
PREP(conditionExecutionDeath);
|
||||
PREP(displayPatientInformation);
|
||||
|
30
addons/medical/functions/fnc_bodyCleanupLoop.sqf
Normal file
30
addons/medical/functions/fnc_bodyCleanupLoop.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: Glowbal, esteldunedain
|
||||
* Loop that cleans up litter
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* ReturnValue:
|
||||
* None
|
||||
*
|
||||
* 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;
|
@ -2,7 +2,9 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
// Hack for #3168 (units in static weapons do not take any damage):
|
||||
// Doing a manual pre-load with a small distance seems to fix the LOD problems
|
||||
|
@ -226,7 +226,7 @@ class GVAR(Actions) {
|
||||
allowSelfTreatment = 0;
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 15;
|
||||
items[] = {"ACE_BodyBag"};
|
||||
items[] = {"ACE_bodyBag"};
|
||||
condition = "!alive _target";
|
||||
callbackSuccess = QFUNC(actionPlaceInBodyBag);
|
||||
callbackFailure = "";
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
// config to determine animation acceleration coefficient
|
||||
// adjusting these is trail and error
|
||||
|
Loading…
Reference in New Issue
Block a user