Bugfix: all items were counted as easter eggs :)

This commit is contained in:
hiker 2018-05-04 16:36:56 +10:00
parent 3e518968b3
commit c7c061c7c1

View File

@ -18,6 +18,7 @@
#include "modes/easter_egg_hunt.hpp"
#include "io/file_manager.hpp"
#include "items/item.hpp"
#include "karts/abstract_kart.hpp"
#include "tracks/track.hpp"
@ -150,6 +151,8 @@ const std::string& EasterEggHunt::getIdent() const
*/
void EasterEggHunt::collectedItem(const AbstractKart *kart, const Item *item)
{
if(item->getType() != ItemState::ITEM_EASTER_EGG) return;
m_eggs_collected[kart->getWorldKartId()]++;
m_eggs_found++;
} // collectedEasterEgg