Skip to content

Commit

Permalink
Fire - Add fire damage to wrecks (#9962)
Browse files Browse the repository at this point in the history
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
  • Loading branch information
johnb432 and PabstMirror authored Dec 13, 2024
1 parent 80d6fd3 commit ba813a5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions addons/fire/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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"];

Expand Down

0 comments on commit ba813a5

Please sign in to comment.