Make wrecks cause fire damage

This commit is contained in:
johnb432 2024-04-20 17:39:25 +02:00
parent 02539ef9c6
commit 46e58177db

View File

@ -14,13 +14,29 @@
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
if (!isServer) exitWith {};
["CBA_settingsInitialized", { ["CBA_settingsInitialized", {
TRACE_1("settingsInit",GVAR(enabled)); TRACE_1("settingsInit",GVAR(enabled));
if (!GVAR(enabled)) exitWith {}; 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; GVAR(fireSources) = createHashMap;
[QGVAR(addFireSource), { [QGVAR(addFireSource), {