parent
d94383e307
commit
ed8b1fc185
@ -33,6 +33,7 @@ EasterEggHunt::EasterEggHunt() : LinearWorld()
|
||||
m_use_highscores = true;
|
||||
m_eggs_found = 0;
|
||||
m_only_ghosts = false;
|
||||
m_finish_time = 0;
|
||||
} // EasterEggHunt
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -191,7 +192,11 @@ void EasterEggHunt::update(int ticks)
|
||||
bool EasterEggHunt::isRaceOver()
|
||||
{
|
||||
if(!m_only_ghosts && m_eggs_found == m_number_of_eggs)
|
||||
{
|
||||
if (m_finish_time == 0)
|
||||
m_finish_time = getTime();
|
||||
return true;
|
||||
}
|
||||
else if (m_only_ghosts)
|
||||
{
|
||||
for (unsigned int i=0 ; i<m_eggs_collected.size();i++)
|
||||
@ -263,5 +268,5 @@ float EasterEggHunt::estimateFinishTimeForKart(AbstractKart* kart)
|
||||
return gk->getGhostFinishTime();
|
||||
}
|
||||
|
||||
return getTime();
|
||||
return m_finish_time;
|
||||
} // estimateFinishTimeForKart
|
||||
|
@ -45,6 +45,8 @@ private:
|
||||
int m_eggs_found;
|
||||
|
||||
bool m_only_ghosts;
|
||||
|
||||
float m_finish_time;
|
||||
public:
|
||||
EasterEggHunt();
|
||||
virtual ~EasterEggHunt();
|
||||
|
Loading…
Reference in New Issue
Block a user