Cookoff - Minor improvement to Fire integration (#8751)

Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
Grim 2024-01-14 17:53:33 -03:00 committed by GitHub
parent 686c252beb
commit 03c7c4e97f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -36,7 +36,7 @@ _vehicle setVariable [QGVAR(isCookingOff), true, true];
// limit maximum value of intensity to prevent very long cook-off times
_intensity = _intensity min _maxIntensity;
private _config = _vehicle call CBA_fnc_getObjectConfig;
private _config = configOf _vehicle;
private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {(_vehicle selectionPosition _x) isNotEqualTo [0,0,0]};
if (_positions isEqualTo []) then {

View File

@ -40,7 +40,7 @@ if (isServer) then {
if (_ring) then {
private _intensity = 6;
private _radius = 1.5 * ((boundingBoxReal _obj) select 2);
[QEGVAR(fire,addFireSource), [_obj, _radius, _intensity, _obj]] call CBA_fnc_localEvent;
[QEGVAR(fire,addFireSource), [_obj, _radius, _intensity, format [QGVAR(%1), hashValue _obj]]] call CBA_fnc_localEvent;
};
};
@ -52,7 +52,7 @@ if (isServer) then {
deleteVehicle _light;
deleteVehicle _sound;
if (isServer) then {
[QEGVAR(fire,removeFireSource), [_obj]] call CBA_fnc_localEvent;
[QEGVAR(fire,removeFireSource), [format [QGVAR(%1), hashValue _obj]]] call CBA_fnc_localEvent;
};
[_pfh] call CBA_fnc_removePerFrameHandler;
};
@ -198,4 +198,3 @@ if (isServer) then {
];
}, 0, [_obj, _jet, _ring, _time, CBA_missionTime, _light, _fireSelection, _sound, _intensity]] call CBA_fnc_addPerFrameHandler;