From ba813a5675d30cb759fe290b22c58f08a8412d35 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:45:33 +0100 Subject: [PATCH] Fire - Add fire damage to wrecks (#9962) Co-authored-by: PabstMirror --- 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 1050d757538..ed9b1b62523 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 && {_vehicle getEntityInfo 13}) then { + [QGVAR(addFireSource), [ + _vehicle, + (boundingBoxReal [_vehicle, "FireGeometry"]) select 2, + BURN_MAX_INTENSITY, + QGVAR(wreck) + hashValue _vehicle, + {_this getEntityInfo 13}, + _vehicle + ]] call CBA_fnc_serverEvent; + }; + }, true, ["Man", "StaticWeapon"], true] call CBA_fnc_addClassEventHandler; // Use "Man" to exclude animals as well + [QGVAR(playScream), { params ["_scream", "_source"];