new tileset fernland
removed annoying debug of resource multiplier fixed resource multiplier display in connected menu
This commit is contained in:
parent
c55855c6f2
commit
42ebe42155
|
@ -320,7 +320,7 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
controlItems.push_back(lang.get("Human"));
|
||||
|
||||
for(int i=0; i<45; ++i){
|
||||
rMultiplier.push_back(intToStr(0.5f+0.1f*i));
|
||||
rMultiplier.push_back(floatToStr(0.5f+0.1f*i,1));
|
||||
}
|
||||
|
||||
if(config.getBool("EnableNetworkCpu","false") == true) {
|
||||
|
|
|
@ -804,27 +804,10 @@ void UnitUpdater::updateHarvest(Unit *unit) {
|
|||
|
||||
//update resources
|
||||
int resourceAmount= unit->getLoadCount();
|
||||
// if(unit->getFaction()->getCpuUltraControl()){
|
||||
// resourceAmount*= ultraResourceFactor;
|
||||
// }
|
||||
// if(unit->getFaction()->getCpuMegaControl()){
|
||||
// resourceAmount*= megaResourceFactor;
|
||||
// }
|
||||
if(unit->getFaction()->getCpuControl())
|
||||
{
|
||||
/* Get the current time. */
|
||||
// time_t curtime = time (NULL);
|
||||
// /* Convert it to local time representation. */
|
||||
// struct tm *loctime = localtime (&curtime);
|
||||
// char szBuf2[100]="";
|
||||
// strftime(szBuf2,100,"%Y-%m-%d %H:%M:%S",loctime);
|
||||
// printf("%s: org. resourceamount :%d ",szBuf2,resourceAmount);
|
||||
|
||||
printf("org. resourceamount :%d ",resourceAmount);
|
||||
int resourceMultiplierIndex=game->getGameSettings()->getResourceMultiplierIndex(unit->getFaction()->getIndex());
|
||||
resourceAmount=(resourceAmount* (resourceMultiplierIndex +5))/10;
|
||||
printf("calc. resourceamount :%d ",resourceAmount);
|
||||
printf("index+5 :%d \n",resourceMultiplierIndex+5);
|
||||
}
|
||||
unit->getFaction()->incResourceAmount(unit->getLoadType(), resourceAmount);
|
||||
world->getStats()->harvest(unit->getFactionIndex(), resourceAmount);
|
||||
|
|
Loading…
Reference in New Issue