Changeset - r16645:aa25d00a0c7d
[Not reviewed]
master
0 1 0
alberth - 13 years ago 2010-12-04 21:36:36
alberth@openttd.org
(svn r21386) -Codechange: Use updated value to decide year to cheat to, instead of increment/decrement.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/cheat_gui.cpp
Show inline comments
 
@@ -117,9 +117,10 @@ static int32 ClickChangeDateCheat(int32 
 
	YearMonthDay ymd;
 
	ConvertDateToYMD(_date, &ymd);
 

	
 
	if ((ymd.year == MIN_YEAR && p2 == -1) || (ymd.year == MAX_YEAR && p2 == 1)) return _cur_year;
 
	p1 = Clamp(p1, MIN_YEAR, MAX_YEAR);
 
	if (p1 == _cur_year) return _cur_year;
 

	
 
	SetDate(ConvertYMDToDate(_cur_year + p2, ymd.month, ymd.day), _date_fract);
 
	SetDate(ConvertYMDToDate(p1, ymd.month, ymd.day), _date_fract);
 
	EnginesMonthlyLoop();
 
	SetWindowDirty(WC_STATUS_BAR, 0);
 
	InvalidateWindowClassesData(WC_BUILD_STATION, 0);
0 comments (0 inline, 0 general)