From cc3f42794d134b9f4b6c7efecb07d4b3366887c1 Mon Sep 17 00:00:00 2001 From: truebrain Date: Mon, 19 Dec 2011 21:05:25 +0000 Subject: (svn r23632) -Add: GSCompanyMode, to change company in GameScripts --- src/script/api/script_basestation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/script/api/script_basestation.cpp') diff --git a/src/script/api/script_basestation.cpp b/src/script/api/script_basestation.cpp index 0ef286242..5bd87ff78 100644 --- a/src/script/api/script_basestation.cpp +++ b/src/script/api/script_basestation.cpp @@ -14,13 +14,12 @@ #include "../../station_base.h" #include "../../string_func.h" #include "../../strings_func.h" -#include "../../company_func.h" #include "table/strings.h" /* static */ bool ScriptBaseStation::IsValidBaseStation(StationID station_id) { const BaseStation *st = ::BaseStation::GetIfValid(station_id); - return st != NULL && (st->owner == _current_company || _current_company == OWNER_DEITY || st->owner == OWNER_NONE); + return st != NULL && (st->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY || st->owner == OWNER_NONE); } /* static */ char *ScriptBaseStation::GetName(StationID station_id) -- cgit v1.2.3-54-g00ecf