Changeset - r16188:0f363c82e603
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-10-04 19:45:27
frosch@openttd.org
(svn r20898) -Change: When entering a production rate, round to nearest possible rate instead towards zero.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/industry_gui.cpp
Show inline comments
 
@@ -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();
 
	}
0 comments (0 inline, 0 general)