mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Minor tweaks
This commit is contained in:
parent
a93c0b46a3
commit
0f24464658
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user