Fixed multiplier bugs

This commit is contained in:
mathusummut
2018-12-11 00:54:51 +01:00
parent e52127c343
commit df8fa0f1ce
4 changed files with 15 additions and 3 deletions

View File

@@ -7569,6 +7569,18 @@ namespace Game {
case ctCpuZeta:
factionInfo += " CPU Zeta" + multiplier;
break;
case ctNetworkCpuEasy:
factionInfo += " Network CPU Easy" + multiplier;
break;
case ctNetworkCpu:
factionInfo += " Network CPU Normal" + multiplier;
break;
case ctNetworkCpuUltra:
factionInfo += " Network CPU Ultra" + multiplier;
break;
case ctNetworkCpuZeta:
factionInfo += " Network CPU Zeta" + multiplier;
break;
default:
break;
}

View File

@@ -713,7 +713,7 @@ namespace Game {
"\nx " + floatToStr(stats.getResourceMultiplier(i), 1);
} else if (stats.getPlayerLeftBeforeEnd(i) == true) {
controlString +=
"\n" + lang.getString("CpuUltra") + "\nx " +
"\n" + lang.getString("CpuZeta") + "\nx " +
floatToStr(stats.getResourceMultiplier(i), 1);
}

View File

@@ -1723,7 +1723,7 @@ namespace Game {
int resourceAmount = unit->getLoadCount();
if (unit->getFaction()->getCpuControl()) {
int resourceMultiplierIndex = game->getGameSettings()->getResourceMultiplierIndex(unit->getFaction()->getIndex());
resourceAmount = (resourceAmount* (resourceMultiplierIndex + 5)) / 10;
resourceAmount = resourceAmount * (resourceMultiplierIndex + 1) * 0.5;
}
unit->getFaction()->incResourceAmount(unit->getLoadType(), resourceAmount);
world->getStats()->harvest(unit->getFactionIndex(), resourceAmount);

View File

@@ -2076,7 +2076,7 @@ namespace Game {
stats.setFactionTypeName(i, formatString(gs->getFactionTypeName(i)));
stats.setPersonalityType(i, getFaction(i)->getType()->getPersonalityType());
stats.setControl(i, gs->getFactionControl(i));
stats.setResourceMultiplier(i, (gs->getResourceMultiplierIndex(i) + 5)*0.1f);
stats.setResourceMultiplier(i, (gs->getResourceMultiplierIndex(i) + 1) * 0.5f);
stats.setPlayerName(i, gs->getNetworkPlayerName(i));
if (getFaction(i)->getTexture()) {
stats.setPlayerColor(i, getFaction(i)->getTexture()->getPixmapConst()->getPixel4f(0, 0));