mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: Use SQInteger for generic numbers in script_companymode
This commit is contained in:
parent
89c0841d0a
commit
424ae74504
|
@ -13,13 +13,13 @@
|
|||
|
||||
#include "../../safeguards.h"
|
||||
|
||||
ScriptCompanyMode::ScriptCompanyMode(int company)
|
||||
ScriptCompanyMode::ScriptCompanyMode(SQInteger company)
|
||||
{
|
||||
if (company < OWNER_BEGIN || company >= MAX_COMPANIES) company = INVALID_COMPANY;
|
||||
if (!::Company::IsValidID(company)) company = INVALID_COMPANY;
|
||||
|
||||
this->last_company = ScriptObject::GetCompany();
|
||||
ScriptObject::SetCompany((CompanyID)company);
|
||||
ScriptObject::SetCompany((::CompanyID)company);
|
||||
}
|
||||
|
||||
ScriptCompanyMode::~ScriptCompanyMode()
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
* @note When the instance is destroyed, it restores the company that was
|
||||
* current when the instance was created!
|
||||
*/
|
||||
ScriptCompanyMode(int company);
|
||||
ScriptCompanyMode(SQInteger company);
|
||||
|
||||
/**
|
||||
* Destroying this instance reset the company to that what it was
|
||||
|
|
Loading…
Reference in New Issue