(svn r23632) -Add: GSCompanyMode, to change company in GameScripts

This commit is contained in:
truebrain
2011-12-19 21:05:25 +00:00
parent 867b263900
commit 95b199e313
46 changed files with 273 additions and 59 deletions

View File

@@ -12,7 +12,6 @@
#include "../../stdafx.h"
#include "script_stationlist.hpp"
#include "script_vehicle.hpp"
#include "../../company_func.h"
#include "../../station_base.h"
#include "../../vehicle_base.h"
@@ -20,7 +19,7 @@ ScriptStationList::ScriptStationList(ScriptStation::StationType station_type)
{
Station *st;
FOR_ALL_STATIONS(st) {
if ((st->owner == _current_company || _current_company == OWNER_DEITY) && (st->facilities & station_type) != 0) this->AddItem(st->index);
if ((st->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && (st->facilities & station_type) != 0) this->AddItem(st->index);
}
}