Skip to content

Commit

Permalink
Cargo - Add check for invoking ace_cargoAdded EH only if cargo was …
Browse files Browse the repository at this point in the history
…actually added (acemod#10084)

Only invoke cargoAdded EH if cargo was actually added
  • Loading branch information
johnb432 authored and blake8090 committed Aug 18, 2024
1 parent e49fe03 commit b3a3db5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addons/cargo/functions/fnc_addCargoItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ if (_item isEqualType "") then {
TRACE_1("loaded",_loaded);

// Invoke listenable event
["ace_cargoAdded", [_item, _vehicle, _loaded]] call CBA_fnc_globalEvent;
if (_loaded > 0) then {
["ace_cargoAdded", [_item, _vehicle, _loaded]] call CBA_fnc_globalEvent;
};

_loaded // return

0 comments on commit b3a3db5

Please sign in to comment.