(svn r20898) -Change: When entering a production rate, round to nearest possible rate instead towards zero.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
frosch 14 years ago
parent 566ba0fccc
commit 168b0a733f

@ -885,8 +885,9 @@ public:
if (StrEmpty(str)) return;
Industry *i = Industry::Get(this->window_number);
uint value = atoi(str);
i->production_rate[this->editbox_line - IL_RATE1] = ClampU(atoi(str) / 8, 0, 255);
i->production_rate[this->editbox_line - IL_RATE1] = ClampU(RoundDivSU(value, 8), 0, 255);
UpdateIndustryProduction(i);
this->SetDirty();
}

Loading…
Cancel
Save