Skip to content

Commit

Permalink
Change comparison of station upgrades to industry
Browse files Browse the repository at this point in the history
http://www.forum.birth-of-the-empires.de./viewtopic.php?p=32695#p32695

Change the station upgrade comparison from ID to industry points
to ignore the order of the shiplist.
  • Loading branch information
Vuto-BotE committed Oct 14, 2013
1 parent a187ab9 commit 3b81cba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion BotE Game/trunk/Source/Gamedata/Galaxy/Sector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,9 +1016,11 @@ bool CSector::IsStationBuildable(SHIP_ORDER::Typ order, const CString& race) con
SHIP_TYPE::Typ type = (order == SHIP_ORDER::UPGRADE_OUTPOST)
? SHIP_TYPE::OUTPOST : SHIP_TYPE::STARBASE;
USHORT bestbuildableID = pMajor->BestBuildableVariant(type, pDoc->m_ShipInfoArray);
USHORT industry = pDoc->m_ShipInfoArray.GetAt(bestbuildableID-10000).GetBaseIndustry();
for(CShipMap::const_iterator k = pDoc->m_ShipMap.begin(); k != pDoc->m_ShipMap.end(); ++k)
if (k->second->GetShipType() == type && k->second->GetKO() == m_KO) {
if (k->second->GetID() < bestbuildableID) {
if (pDoc->m_ShipInfoArray.GetAt(k->second->GetID()-10000).GetBaseIndustry()
< industry) {
return StationBuildContinuable(race, *this);
}
break;
Expand Down

0 comments on commit 3b81cba

Please sign in to comment.