ACE3/addons/medical_engine/XEH_preInit.sqf
SilentSpike 34eb5553ea
Move scream and moan sounds to medical feedback (#6438)
* Move scream and moan sounds to medical feedback
* Move vanilla feedback overrides to medical feedback
* Update all function calls
* Use events to avoid a dependency
2018-07-18 19:21:27 +01:00

34 lines
824 B
Plaintext

#include "script_component.hpp"
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
// with handle damage not returning full results.
GVAR(fixedStatics) = [];
private _fnc_fixStatic = {
params ["_vehicle"];
private _type = typeOf _vehicle;
if !(_type in GVAR(fixedStatics)) then {
GVAR(fixedStatics) pushBack _type;
PRELOAD_CLASS(_type);
};
};
["StaticWeapon", "init", _fnc_fixStatic] call CBA_fnc_addClassEventHandler;
["Car", "init", _fnc_fixStatic] call CBA_fnc_addClassEventHandler;
addMissionEventHandler ["Loaded", {
{
PRELOAD_CLASS(_x);
} forEach GVAR(fixedStatics);
}];
ADDON = true;