Skip to content

Commit

Permalink
Fix allied research time display.
Browse files Browse the repository at this point in the history
Was displaying as if it would take longer than it really did.
  • Loading branch information
Cyp committed May 14, 2016
1 parent c82e091 commit 1ee5fcb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/research.cpp
Expand Up @@ -1378,8 +1378,7 @@ std::vector<AllyResearch> const &listAllyResearch(unsigned ref)
r.timeToResearch = -1;
if (r.powerNeeded == -1)
{
r.timeToResearch = (subject.researchPoints - playerRes.currentPoints)
/ MAX(psStruct->pStructureType->base.research, 1u);
r.timeToResearch = (subject.researchPoints - playerRes.currentPoints) / std::max(getBuildingResearchPoints(psStruct), 1);
}
r.active = psStruct->status == SS_BUILT;
researches[cRef].push_back(r);
Expand Down

0 comments on commit 1ee5fcb

Please sign in to comment.