Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Fix ability to get negative budget #186

Merged
merged 1 commit into from
Jun 24, 2019
Merged
Changes from all 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
2 changes: 2 additions & 0 deletions addons/fortify/functions/fnc_updateBudget.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ if (_side isEqualTo sideUnknown) exitWith {ERROR("Unknown side");};
private _budget = [_side] call FUNC(getBudget);
private _newBudget = _budget + _change;

_newBudget = 0 max _newBudget;

if (_budget != -1) then {
missionNamespace setVariable [format [QGVAR(Budget_%1), _side], _newBudget, true];

Expand Down