diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 21:05:25 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 21:05:25 +0000 |
commit | cc3f42794d134b9f4b6c7efecb07d4b3366887c1 (patch) | |
tree | 1cd422d47fc44bd59463d0f9e2ef96f2edb09b50 /src/script/api/script_enginelist.cpp | |
parent | 403cd3acdb7b7fedf2b5e823326611bb32113385 (diff) | |
download | openttd-cc3f42794d134b9f4b6c7efecb07d4b3366887c1.tar.xz |
(svn r23632) -Add: GSCompanyMode, to change company in GameScripts
Diffstat (limited to 'src/script/api/script_enginelist.cpp')
-rw-r--r-- | src/script/api/script_enginelist.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/script_enginelist.cpp b/src/script/api/script_enginelist.cpp index e76d86e13..196f1ff1d 100644 --- a/src/script/api/script_enginelist.cpp +++ b/src/script/api/script_enginelist.cpp @@ -11,7 +11,6 @@ #include "../../stdafx.h" #include "script_enginelist.hpp" -#include "../../company_func.h" #include "../../engine_base.h" #include "../../core/bitmath_func.hpp" @@ -19,6 +18,6 @@ ScriptEngineList::ScriptEngineList(ScriptVehicle::VehicleType vehicle_type) { Engine *e; FOR_ALL_ENGINES_OF_TYPE(e, (::VehicleType)vehicle_type) { - if (_current_company == OWNER_DEITY || HasBit(e->company_avail, _current_company)) this->AddItem(e->index); + if (ScriptObject::GetCompany() == OWNER_DEITY || HasBit(e->company_avail, ScriptObject::GetCompany())) this->AddItem(e->index); } } |