mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
34eb5553ea
* 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
34 lines
824 B
Plaintext
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;
|