From 5aeb44c1a6c06f1308b21def4787aa07a110fcdf Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:42:48 +0200 Subject: [PATCH] Update XEH_postInit.sqf --- addons/fire/XEH_postInit.sqf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/addons/fire/XEH_postInit.sqf b/addons/fire/XEH_postInit.sqf index 1050d75753..6037600e2c 100644 --- a/addons/fire/XEH_postInit.sqf +++ b/addons/fire/XEH_postInit.sqf @@ -9,6 +9,22 @@ [QGVAR(burnEffects), LINKFUNC(burnEffects)] call CBA_fnc_addEventHandler; [QGVAR(burnSimulation), LINKFUNC(burnSimulation)] call CBA_fnc_addEventHandler; + // 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; + [QGVAR(playScream), { params ["_scream", "_source"];