Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adv Vehicle Damage - Fix cookoff event args #10338

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]];
johnb432 marked this conversation as resolved.
Show resolved Hide resolved
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, _delaySmoke, _fireDetonateChance, _detonateAfterCookoff, _sourceHit, _canRing, _canJet]] call CBA_fnc_serverEvent;
TRACE_4("cooking-off",_vehicle,_chanceOfFire,_delaySmoke,_detonateAfterCookoff);

// Abandon vehicle
Expand Down