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_rail.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_rail.cpp')
-rw-r--r-- | src/script/api/script_rail.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/script_rail.cpp b/src/script/api/script_rail.cpp index 631578806..edd931388 100644 --- a/src/script/api/script_rail.cpp +++ b/src/script/api/script_rail.cpp @@ -17,7 +17,6 @@ #include "script_cargo.hpp" #include "../../debug.h" #include "../../station_base.h" -#include "../../company_func.h" #include "../../newgrf.h" #include "../../newgrf_generic.h" #include "../../newgrf_station.h" @@ -74,7 +73,7 @@ { if ((::RailType)rail_type < RAILTYPE_BEGIN || (::RailType)rail_type >= RAILTYPE_END) return false; - return _current_company == OWNER_DEITY || ::HasRailtypeAvail(_current_company, (::RailType)rail_type); + return ScriptObject::GetCompany() == OWNER_DEITY || ::HasRailtypeAvail(ScriptObject::GetCompany(), (::RailType)rail_type); } /* static */ ScriptRail::RailType ScriptRail::GetCurrentRailType() |