Browse Source

Fixed previous commit. Actually it was float/int mismatch,

DjWarmonger 15 năm trước cách đây
mục cha
commit
eb525be52a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      hch/CObjectHandler.cpp

+ 1 - 1
hch/CObjectHandler.cpp

@@ -1949,7 +1949,7 @@ int CGTownInstance::creatureGrowth(const int & level) const
 	ret *= (1 + VLC->creh->creatures[creid]->valOfBonuses(Bonus::CREATURE_GROWTH_PERCENT)/100); // double growth or plague
 	if(tempOwner != NEUTRAL_PLAYER)
 	{
-		ret *= (1 + cb->gameState()->players[tempOwner].valOfBonuses(Bonus::CREATURE_GROWTH_PERCENT)/100); //Statue of Legion
+		ret *= (100.0f + cb->gameState()->players[tempOwner].valOfBonuses(Bonus::CREATURE_GROWTH_PERCENT))/100; //Statue of Legion
 		for (std::vector<CGDwelling*>::const_iterator it = cb->gameState()->players[tempOwner].dwellings.begin(); it != cb->gameState()->players[tempOwner].dwellings.end(); ++it)
 		{ //+1 for each dwelling
 			if (VLC->creh->creatures[creid]->idNumber == (*it)->creatures[0].second[0])