diff options
author | frosch <frosch@openttd.org> | 2013-12-08 18:20:14 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-12-08 18:20:14 +0000 |
commit | 51f5d62fdbc2aa22e890098de4184f13a0b10569 (patch) | |
tree | 80e9453cc05680aded250c106ac09a5cdbd334b8 /src | |
parent | bf0e7c34e6b2031135eccd9f8a68f4f2157bccbb (diff) | |
download | openttd-51f5d62fdbc2aa22e890098de4184f13a0b10569.tar.xz |
(svn r26150) -Revert (r26120): EnforcePrecondition alters the last-error status and is only meant for commands.
Diffstat (limited to 'src')
-rw-r--r-- | src/script/api/script_company.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp index ee00ef9e5..851ca7888 100644 --- a/src/script/api/script_company.cpp +++ b/src/script/api/script_company.cpp @@ -246,7 +246,7 @@ /* 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; |