Fixed compilation errors - no idea why VS compiled it ok previously :(

This commit is contained in:
hiker 2014-02-24 08:26:51 +11:00
parent 4f266639aa
commit 71f61f71c6
4 changed files with 3 additions and 7 deletions

View File

@ -84,3 +84,4 @@ public:
bool isAchieved() const { return m_achieved; }
}; // class Achievement
#endif

View File

@ -77,11 +77,10 @@ irr::core::stringw AchievementInfo::toString() const
// ----------------------------------------------------------------------------
bool AchievementInfo::checkCompletion(Achievement * achievement) const
{
MapAchievement * map_achievement = (MapAchievement *) achievement;
std::map<std::string, int>::const_iterator iter;
for ( iter = m_goal_values.begin(); iter != m_goal_values.end(); iter++ )
{
if(map_achievement->getValue(iter->first) < iter->second)
if(achievement->getValue(iter->first) < iter->second)
return false;
}
return true;

View File

@ -86,10 +86,6 @@ void AchievementsStatus::add(Achievement *achievement)
m_achievements[achievement->getID()] = achievement;
} // add
// ----------------------------------------------------------------------------
void AchievementsStatus::deleteAchievements()
{
} // deleteAchievements
// ----------------------------------------------------------------------------
/** Saves the achievement status to a file. Achievements are stored as part

View File

@ -448,7 +448,7 @@ void World::terminateRace()
PlayerManager::get()->getCurrentPlayer()->raceFinished();
AchievementsStatus* status = PlayerManager::getCurrentAchievementsStatus();
dynamic_cast<MapAchievement*>(status->getAchievement(1))->increase(getTrack()->getIdent(), 1);
status->getAchievement(1)->increase(getTrack()->getIdent(), 1);
AchievementsManager::get()->onRaceEnd();
if (m_race_gui) m_race_gui->clearAllMessages();