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

This commit is contained in:
truebrain
2011-12-19 21:05:25 +00:00
parent 403cd3acdb
commit cc3f42794d
46 changed files with 273 additions and 59 deletions

View File

@@ -12,7 +12,6 @@
#include "../../stdafx.h"
#include "script_waypointlist.hpp"
#include "script_vehicle.hpp"
#include "../../company_func.h"
#include "../../vehicle_base.h"
#include "../../waypoint_base.h"
@@ -21,7 +20,7 @@ ScriptWaypointList::ScriptWaypointList(ScriptWaypoint::WaypointType waypoint_typ
const Waypoint *wp;
FOR_ALL_WAYPOINTS(wp) {
if ((wp->facilities & waypoint_type) &&
(wp->owner == _current_company || _current_company == OWNER_DEITY || wp->owner == OWNER_NONE)) this->AddItem(wp->index);
(wp->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY || wp->owner == OWNER_NONE)) this->AddItem(wp->index);
}
}