1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

* Improved battle and bonus system performance (significantly faster in debug build, tip: use vs 2008, turn of hex field presentation)

* Implemented caching for the bonus system
This commit is contained in:
beegee1
2011-06-25 13:53:15 +00:00
parent a60fd00e22
commit 5fdb5aa494
13 changed files with 233 additions and 131 deletions

View File

@ -2261,9 +2261,9 @@ void CGTownInstance::deserializationFix()
void CGTownInstance::recreateBuildingsBonuses()
{
BonusList bl;
boost::shared_ptr<BonusList> bl(new BonusList);
exportedBonuses.getBonuses(bl, Selector::sourceType(Bonus::TOWN_STRUCTURE));
BOOST_FOREACH(Bonus *b, bl)
BOOST_FOREACH(Bonus *b, *bl)
removeBonus(b);