Changeset - r16433:9149b1d03a2a
[Not reviewed]
master
0 1 0
alberth - 14 years ago 2010-11-13 10:17:16
alberth@openttd.org
(svn r21159) -Codechange: AdvertiseIndustryOpening() also works with a const pointer.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -1902,13 +1902,13 @@ static uint GetNumberOfIndustries()
 
}
 

	
 
/**
 
 * Advertise about a new industry opening.
 
 * @param ind Industry being opened.
 
 */
 
static void AdvertiseIndustryOpening(Industry *ind)
 
static void AdvertiseIndustryOpening(const Industry *ind)
 
{
 
	const IndustrySpec *ind_spc = GetIndustrySpec(ind->type);
 
	SetDParam(0, ind_spc->name);
 
	if (ind_spc->new_industry_text > STR_LAST_STRINGID) {
 
		SetDParam(1, STR_TOWN_NAME);
 
		SetDParam(2, ind->town->index);
 
@@ -2077,13 +2077,13 @@ static void MaybeNewIndustry()
 
	for (j = 0; j < NUM_INDUSTRYTYPES; j++) {
 
		/* and choose the index of the industry that matches as close as possible this random type */
 
		if (cumulative_probs[j].prob >= rndtype) break;
 
	}
 

	
 
	/* try to create 2000 times this industry */
 
	Industry *ind = PlaceIndustry(cumulative_probs[j].ind, IACT_RANDOMCREATION, false);
 
	const Industry *ind = PlaceIndustry(cumulative_probs[j].ind, IACT_RANDOMCREATION, false);
 
	if (ind == NULL) return;
 

	
 
	AdvertiseIndustryOpening(ind);
 
}
 

	
 
/**
0 comments (0 inline, 0 general)