mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-16 17:15:05 +01:00
(svn r26120) -Fix: [Script] Replace simple check with precondition check, after that simple check was documented as a precondition
This commit is contained in:
parent
3b83a195ca
commit
945fccc706
@ -246,7 +246,7 @@
|
||||
/* static */ TileIndex ScriptCompany::GetCompanyHQ(CompanyID company)
|
||||
{
|
||||
company = ResolveCompanyID(company);
|
||||
if (company == COMPANY_INVALID) return INVALID_TILE;
|
||||
EnforcePrecondition(INVALID_TILE, company != COMPANY_INVALID);
|
||||
|
||||
TileIndex loc = ::Company::Get((CompanyID)company)->location_of_HQ;
|
||||
return (loc == 0) ? INVALID_TILE : loc;
|
||||
|
Loading…
Reference in New Issue
Block a user