mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-07 06:39:08 +00:00
(svn r26150) -Revert (r26120): EnforcePrecondition alters the last-error status and is only meant for commands.
This commit is contained in:
parent
bf0e7c34e6
commit
51f5d62fdb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user