Skip to content

Commit

Permalink
Adv Vehicle Damage - Fix cookoff event args
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Sep 26, 2024
1 parent ca3aa3f commit b625385
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions addons/vehicle_damage/functions/fnc_handleCookoff.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* Public: No
*/

params ["_vehicle", "_chanceOfFire", "_intensity", "_source", "_instigator", ["_hitPart", ""], ["_canRing", true], ["_canJet", true]];
TRACE_8("handleCookoff",_vehicle,_chanceOfFire,_intensity,_source,_instigator,_hitPart,_canRing,_canJet);
params ["_vehicle", "_chanceOfFire", "_intensity", "_sourceObj", "_instigator", ["_hitPart", ""], ["_canRing", true], ["_canJet", true]];
TRACE_8("handleCookoff",_vehicle,_chanceOfFire,_intensity,_sourceObj,_instigator,_hitPart,_canRing,_canJet);

// Ignore if the vehicle is already cooking off
if (_vehicle getVariable [QEGVAR(cookoff,isCookingOff), false]) exitWith {
Expand Down Expand Up @@ -56,13 +56,13 @@ if (_canJet) then {
private _delaySmoke = _chanceOfFire < random 1;
private _detonateAfterCookoff = (_fireDetonateChance / 4) > random 1;

private _source = "";
private _sourceHit = "";

if (_hitPart == "engine") then {
_source = ["hit_engine_point", "HitPoints"];
_sourceHit = ["hit_engine_point", "HitPoints"];
};

[QEGVAR(cookOff,cookOffServer), [_vehicle, _intensity, _injurer, _injurer, _delayWithSmoke, _fireDetonateChance, _detonateAfterCookoff, _source, _canRing, _canJet]] call CBA_fnc_serverEvent;
[QEGVAR(cookOff,cookOffServer), [_vehicle, _intensity, _sourceObj, _instigator, _delayWithSmoke, _fireDetonateChance, _detonateAfterCookoff, _sourceHit, _canRing, _canJet]] call CBA_fnc_serverEvent;
TRACE_4("cooking-off",_vehicle,_chanceOfFire,_delaySmoke,_detonateAfterCookoff);

// Abandon vehicle
Expand Down

0 comments on commit b625385

Please sign in to comment.