my last bts game played with this Unofficial BtS Patch, everything was fine before i created my two corporations, i got a negative inflated costs and a negative total expenses, -1xxx total expeses.
i have checked the code, i think in function
Code:
int CvPlayer::getTotalCorporationMaintenance() const
{
int iLoop;
CvCity *pLoopCity;
int iTotalCorporationMaintenance = 0;
for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
{
iTotalCorporationMaintenance += pLoopCity->calculateCorporationMaintenanceTimes100() * pLoopCity->getMaintenanceModifier() / 100;
}
iTotalCorporationMaintenance /= 100;
return abs(iTotalCorporationMaintenance);
}
the line in the loop should be
Code:
iTotalCorporationMaintenance += pLoopCity->calculateCorporationMaintenanceTimes100() * max(0, (pLoopCity->getMaintenanceModifier() + 100)) / 100;