Skip to content

Commit

Permalink
Merge pull request #1682 from CBATeam/disFloats
Browse files Browse the repository at this point in the history
Disposables - Fix check if floating point mass are roughly the same
  • Loading branch information
PabstMirror authored Sep 21, 2024
2 parents 3df747a + 93fce81 commit 543b57c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/disposable/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private _cfgMagazines = configFile >> "CfgMagazines";
WARNING_4("Mass of launcher %1 (%2) is different from mass of used launcher %3 (%4).",_launcher,_massLauncher,_usedLauncher,_massUsedLauncher);
};

if (_massLauncher + _massMagazine != _massLoadedLauncher) then {
if ((abs(_massLauncher + _massMagazine - _massLoadedLauncher)) > 0.011) then {
WARNING_7("Sum of mass of launcher %1 and mass of magazine %2 (%3+%4=%5) is different from mass of loaded launcher %6 (%7).",_launcher,_magazine,_massLauncher,_massMagazine,_massLauncher + _massMagazine,_loadedLauncher,_massLoadedLauncher);
};
} forEach configProperties [configFile >> "CBA_DisposableLaunchers", "isArray _x"];
Expand Down

0 comments on commit 543b57c

Please sign in to comment.