Changeset - r21068:1ff014815343
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-12-08 18:20:14
frosch@openttd.org
(svn r26150) -Revert (r26120): EnforcePrecondition alters the last-error status and is only meant for commands.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_company.cpp
Show inline comments
 
@@ -243,13 +243,13 @@
 
	return ScriptObject::DoCommand(tile, OBJECT_HQ, 0, CMD_BUILD_OBJECT);
 
}
 

	
 
/* static */ TileIndex ScriptCompany::GetCompanyHQ(CompanyID company)
 
{
 
	company = ResolveCompanyID(company);
 
	EnforcePrecondition(INVALID_TILE, company != COMPANY_INVALID);
 
	if (company == COMPANY_INVALID) return INVALID_TILE;
 

	
 
	TileIndex loc = ::Company::Get((CompanyID)company)->location_of_HQ;
 
	return (loc == 0) ? INVALID_TILE : loc;
 
}
 

	
 
/* static */ bool ScriptCompany::SetAutoRenewStatus(bool autorenew)
0 comments (0 inline, 0 general)