Skip to content

Commit

Permalink
drop redundant null check
Browse files Browse the repository at this point in the history
Co-authored-by: johnb432 <[email protected]>
  • Loading branch information
LinkIsGrim and johnb432 authored Jul 28, 2024
1 parent b0504d7 commit 89491c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/csw/functions/fnc_ai_switchMagazine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

params [["_vehicle", objNull, [objNull]], ["_carryMag", "", [""]], ["_turretPath", [0], [[0]]], ["_instantReload", false, [false]], ["_clearForcedMag", true, [true]]];

if !(alive _vehicle && {!isNull (_vehicle turretUnit _turretPath)} && {!(isNull _vehicle)}) exitWith {false};
if !(alive _vehicle && {!isNull (_vehicle turretUnit _turretPath)}) exitWith {false};

// must be config case
_carryMag = configName (configFile >> "CfgMagazines" >> _carryMag);
Expand Down

0 comments on commit 89491c1

Please sign in to comment.