@@ -529,8+529,13 @@ void Fleet::addResource(std::string type, int number, int tick = 0)
{
int ticks = m_Resources[type].size();
+ int latest = 0;
+
+ if (ticks > 0)
+ latest = m_Resources[type][ticks - 1];
+
for (int i = ticks; i <= tick; ++i)
- m_Resources[type].push_back(number);
+ m_Resources[type].push_back(latest);
m_Resources[type][tick] += number;
}
@@ -630,7+635,7 @@ void Fleet::distributeCappedRoids(std::vector<Fleet*> fleets, int tick = 0)
int lost = totcapped * part;
cerr << (*j)->name() << " gaining " << lost << " " << res << " since it's " << part * 100 << "% of the whole score, and it had : " << fl1 << " score last tick.. compared to fleet total of: " << score(0) << endl;