diff --git a/addons/fire/XEH_postInit.sqf b/addons/fire/XEH_postInit.sqf index ed808d6946..3dcff3b07c 100644 --- a/addons/fire/XEH_postInit.sqf +++ b/addons/fire/XEH_postInit.sqf @@ -14,13 +14,29 @@ }; }] call CBA_fnc_addEventHandler; -if (!isServer) exitWith {}; - ["CBA_settingsInitialized", { TRACE_1("settingsInit",GVAR(enabled)); if (!GVAR(enabled)) exitWith {}; + // Make burning wrecks into fire sources + ["AllVehicles", "Killed", { + params ["_vehicle", "", "", "_useEffects"]; + + if (_useEffects) then { + [QGVAR(addFireSource), [ + _vehicle, + (boundingBoxReal [_vehicle, "FireGeometry"]) select 2, + BURN_MAX_INTENSITY, + QGVAR(wreck) + hashValue _vehicle, + {!isNull _this && {_this getEntityInfo 13}}, + _vehicle + ]] call CBA_fnc_serverEvent; + }; + }, true, ["CAManBase", "StaticWeapon"], true] call CBA_fnc_addClassEventHandler; + + if (!isServer) exitWith {}; + GVAR(fireSources) = createHashMap; [QGVAR(addFireSource), {