diff --git a/addons/fire/XEH_postInit.sqf b/addons/fire/XEH_postInit.sqf index ed808d6946..8943db89c0 100644 --- a/addons/fire/XEH_postInit.sqf +++ b/addons/fire/XEH_postInit.sqf @@ -42,6 +42,13 @@ if (!isServer) exitWith {}; if (_radius == 0 || _intensity == 0) exitWith {}; if (_key isEqualTo "") exitWith {}; // key can be many types + // hashValue supports more types than hashmaps do by default, but not all (e.g. locations) + private _hashedKey = hashValue _key; + + if (isNil "_hashedKey") exitWith { + ERROR_2("Unsupported key type used: %1 - %2",_key,typeName _key); + }; + // If a position is passed, create a static object at said position private _sourcePos = if (_isObject) then { getPosATL _source @@ -56,13 +63,6 @@ if (!isServer) exitWith {}; _fireLogic attachTo [_source]; }; - // hashValue supports more types than hashmaps do by default, but not all (e.g. locations) - private _hashedKey = hashValue _key; - - if (isNil "_hashedKey") exitWith { - ERROR_2("Unsupported key type used: %1 - %2",_key,typeName _key); - }; - // To avoid issues, remove existing entries first before overwriting if (_hashedKey in GVAR(fireSources)) then { [QGVAR(removeFireSource), _key] call CBA_fnc_localEvent; diff --git a/addons/fire/functions/fnc_fireManagerPFH.sqf b/addons/fire/functions/fnc_fireManagerPFH.sqf index 540caa7de7..4cdc61a7ac 100644 --- a/addons/fire/functions/fnc_fireManagerPFH.sqf +++ b/addons/fire/functions/fnc_fireManagerPFH.sqf @@ -20,14 +20,17 @@ private _adjustedIntensity = 0; { _y params ["_fireLogic", "_radius", "_intensity", "_condition", "_conditionArgs"]; + TRACE_2("fireManagerPFH loop",_x,_y); // Remove when condition is no longer valid if !(_conditionArgs call _condition) then { - (GVAR(fireSources) deleteAt _x) params [["_fireLogic", objNull]]; + TRACE_2("condition no longer valid, deleting",_x,_y); detach _fireLogic; deleteVehicle _fireLogic; + GVAR(fireSources) deleteAt _x; + continue; }; @@ -42,5 +45,7 @@ private _adjustedIntensity = 0; }; [QGVAR(burn), [_x, _adjustedIntensity], _x] call CBA_fnc_targetEvent; + + TRACE_3("propagate fire",_x,_intensity,_adjustedIntensity); } forEach nearestObjects [_fireLogic, ["CAManBase"], _radius]; } forEach GVAR(fireSources);