summaryrefslogtreecommitdiff
path: root/src/script/api/script_town.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 21:05:25 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 21:05:25 +0000
commitcc3f42794d134b9f4b6c7efecb07d4b3366887c1 (patch)
tree1cd422d47fc44bd59463d0f9e2ef96f2edb09b50 /src/script/api/script_town.cpp
parent403cd3acdb7b7fedf2b5e823326611bb32113385 (diff)
downloadopenttd-cc3f42794d134b9f4b6c7efecb07d4b3366887c1.tar.xz
(svn r23632) -Add: GSCompanyMode, to change company in GameScripts
Diffstat (limited to 'src/script/api/script_town.cpp')
-rw-r--r--src/script/api/script_town.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp
index 081bccd51..88494215e 100644
--- a/src/script/api/script_town.cpp
+++ b/src/script/api/script_town.cpp
@@ -178,7 +178,7 @@
{
if (!IsValidTown(town_id)) return false;
- return ::HasBit(::Town::Get(town_id)->statues, _current_company);
+ return ::HasBit(::Town::Get(town_id)->statues, ScriptObject::GetCompany());
}
/* static */ bool ScriptTown::IsCity(TownID town_id)
@@ -213,7 +213,7 @@
{
if (!IsValidTown(town_id)) return false;
- return HasBit(::GetMaskOfTownActions(NULL, _current_company, ::Town::Get(town_id)), town_action);
+ return HasBit(::GetMaskOfTownActions(NULL, ScriptObject::GetCompany(), ::Town::Get(town_id)), town_action);
}
/* static */ bool ScriptTown::PerformTownAction(TownID town_id, TownAction town_action)