added conditional to avoid having to ping the stats map all the time. The data

is already cached, but there's no need to spend a function call to check the hashmap
if we have a bool for that reason.
This commit is contained in:
techdragon.nguyen@gmail.com
2011-02-14 17:38:57 +00:00
parent 73b2d5ded8
commit 16f7d2d675

View File

@@ -215,7 +215,7 @@ void DeckMenu::Render()
if (currentMenuItem->mY - kLineHeight * startId < mY + height - kLineHeight + 7)
{
// only load stats for visible items in the list
if (currentMenuItem->meta)
if (currentMenuItem->meta && !currentMenuItem->meta->mStatsLoaded)
{
currentMenuItem->meta->LoadStats();
}