Skip to content

Commit ffebe37

Browse files
committed
Merge pull request OpenXcom#879 from OmniscientQ/mfgInfiniteFix
If making infinite items, don't set a minimum.
2 parents aa07acf + e284b70 commit ffebe37

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/Savegame/Production.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,15 @@ productionProgress_e Production::step(Base * b, SavedGame * g, const Ruleset *r)
105105
_timeSpent += _engineers;
106106
if (done < getAmountProduced ())
107107
{
108-
int produced = std::min(getAmountProduced(), _amount) - done; // std::min is required because we don't want to overproduce
108+
int produced;
109+
if (!getInfiniteAmount())
110+
{
111+
produced = std::min(getAmountProduced(), _amount) - done; // std::min is required because we don't want to overproduce
112+
}
113+
else
114+
{
115+
produced = getAmountProduced() - done;
116+
}
109117
int count = 0;
110118
do
111119
{

0 commit comments

Comments
 (0)