diff --git a/addons/fire/functions/fnc_burn.sqf b/addons/fire/functions/fnc_burn.sqf index cd8bad71d4..1cf0fc6759 100644 --- a/addons/fire/functions/fnc_burn.sqf +++ b/addons/fire/functions/fnc_burn.sqf @@ -5,8 +5,8 @@ * * Arguments: * 0: Unit - * 1: Intensity of fire - * 2: Instigator of fire (default: objNull) + * 1: Fire intensity + * 2: Fire instigator (default: objNull) * * Return Value: * None @@ -54,6 +54,11 @@ if (surfaceIsWater _eyePos && {(_eyePos select 2) < 0.1}) exitWith { // If unit is already burning, update intensity, but don't add another PFH if (_unit call FUNC(isBurning)) exitWith { + // Only allow intensity to be increased + if (_intensity <= (_unit getVariable [QGVAR(intensity), 0])) exitWith { + TRACE_2("unit already burning, no intensity update",_unit,_intensity); + }; + TRACE_2("unit already burning, updating intensity",_unit,_intensity); _unit setVariable [QGVAR(intensity), _intensity, true]; @@ -63,7 +68,7 @@ TRACE_2("setting unit ablaze",_unit,_intensity); _unit setVariable [QGVAR(intensity), _intensity, true]; -// Fire simulation (objects are handled differently) +// Fire simulation (fire sources are handled differently) [QGVAR(burnSimulation), [_unit, _instigator], _unit] call CBA_fnc_targetEvent; // Spawn effects for unit diff --git a/addons/fire/functions/fnc_burnEffects.sqf b/addons/fire/functions/fnc_burnEffects.sqf index da69020721..4dadda8526 100644 --- a/addons/fire/functions/fnc_burnEffects.sqf +++ b/addons/fire/functions/fnc_burnEffects.sqf @@ -76,7 +76,7 @@ if (isServer) then { }; // Display burn indicators - if (_unit == ACE_player && {alive _unit} && {isNil {_unit getVariable QGVAR(burnUIPFH)}}) then { // this accounts for player remote controlled a new unit + if (_unit == ACE_player && {alive _unit} && {isNil {_unit getVariable QGVAR(burnUIPFH)}}) then { // This accounts for player remote controlled a new unit private _burnIndicatorPFH = [LINKFUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler; _unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH]; }; @@ -120,7 +120,7 @@ if (isServer) then { _fireParticle setParticleRandom [ 0.04 * _intensity, // life time [0.05, 0.05, 2], // position - [0.05 * _intensity, 0.05 * _intensity, 0.05 * _intensity], // move velocity + [0.05, 0.05, 0.05] vectorMultiply _intensity, // move velocity 0, // rotation velocity 0.06 * _intensity, // size [0, 0, 0, 0], // color diff --git a/addons/fire/functions/fnc_burnSimulation.sqf b/addons/fire/functions/fnc_burnSimulation.sqf index 908ccb5ee0..8a1dddfc15 100644 --- a/addons/fire/functions/fnc_burnSimulation.sqf +++ b/addons/fire/functions/fnc_burnSimulation.sqf @@ -164,6 +164,6 @@ params ["_unit", "_instigator"]; // Use event directly, as ace_medical_fnc_addDamageToUnit requires unit to be alive [QEGVAR(medical,woundReceived), [_unit, [[_damageToAdd, _bodyPart, _damageToAdd]], _instigator, "burn"]] call CBA_fnc_localEvent; - _unit setVariable [QGVAR(intensity), _intensity, true]; // globally sync intensity across all clients to make sure simulation is deterministic + _unit setVariable [QGVAR(intensity), _intensity, true]; // Globally sync intensity across all clients to make sure simulation is deterministic }; }, BURN_PROPAGATE_UPDATE, [_unit, _instigator]] call CBA_fnc_addPerFrameHandler;