Changeset - r8406:5987646ec652
[Not reviewed]
master
0 1 0
belugas - 16 years ago 2008-01-24 18:16:04
belugas@openttd.org
(svn r11976) -Fix: It seems that industries using results 0D/0E on callback cb29/35 were a bit too eager to close down.
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -2143,9 +2143,13 @@ static void ChangeIndustryProduction(Ind
 
		}
 
	}
 

	
 
	/* Increase or Decreasing the production level if needed */
 
	if (increment != 0) {
 
		i->prod_level = ClampU(i->prod_level + increment, 4, 0x80);
 
		if (i->prod_level == 4) closeit = true;
 
		if !(increment < 0 && i->prod_level == 4) {
 
			closeit = true;
 
		} else {
 
			i->prod_level = ClampU(i->prod_level + increment, 4, 0x80);
 
		}
 
	}
 

	
 
	/* Close if needed and allowed */
0 comments (0 inline, 0 general)