Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Support 2.08's `setMaxLoad`

Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com>
  • Loading branch information
PabstMirror and LinkIsGrim authored Mar 19, 2022
1 parent 4a17bde commit 26dcb6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/common/fnc_canAddItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ if (_unit isKindOf "CAManBase") then {
_mass == 0
|| {
// each time subtract whole number of items which can be put in container
_count = _count - floor (getContainerMaxLoad uniform _unit * (1 - loadUniform _unit) / _mass);
_count = _count - floor (maxLoad uniformContainer _unit * (1 - loadUniform _unit) / _mass);
_count <= 0
}
}
Expand All @@ -117,7 +117,7 @@ if (_unit isKindOf "CAManBase") then {
&& {
_mass == 0
|| {
_count = _count - floor (getContainerMaxLoad vest _unit * (1 - loadVest _unit) / _mass);
_count = _count - floor (maxLoad vestContainer _unit * (1 - loadVest _unit) / _mass);
_count <= 0
}
}
Expand All @@ -129,7 +129,7 @@ if (_unit isKindOf "CAManBase") then {
&& {
_mass == 0
|| {
_count = _count - floor (getContainerMaxLoad backpack _unit * (1 - loadBackpack _unit) / _mass);
_count = _count - floor (maxLoad backpackContainer _unit * (1 - loadBackpack _unit) / _mass);
_count <= 0
}
}
Expand Down

0 comments on commit 26dcb6c

Please sign in to comment.