'Better' fix for incorrect time in easter egg mode - thanks to
Devee for diagnosing the problem! git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14512 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
5ea57efaac
commit
a97430c882
@ -221,3 +221,11 @@ void EasterEggHunt::terminateRace()
|
||||
m_karts[0]->getControls().reset();
|
||||
WorldWithRank::terminateRace();
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
/** In Easter Egg mode the finish time is just the time the race is over,
|
||||
* since there are no AI karts.
|
||||
*/
|
||||
float EasterEggHunt::estimateFinishTimeForKart(AbstractKart* kart)
|
||||
{
|
||||
return getTime();
|
||||
} // estimateFinishTimeForKart
|
||||
|
@ -66,6 +66,8 @@ public:
|
||||
void readData(const std::string &filename);
|
||||
|
||||
virtual void checkForWrongDirection(unsigned int i) OVERRIDE;
|
||||
virtual float estimateFinishTimeForKart(AbstractKart* kart) OVERRIDE;
|
||||
|
||||
}; // EasterEggHunt
|
||||
|
||||
|
||||
|
@ -549,9 +549,6 @@ void LinearWorld::getKartsDisplayInfo(
|
||||
*/
|
||||
float LinearWorld::estimateFinishTimeForKart(AbstractKart* kart)
|
||||
{
|
||||
if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_EASTER_EGG)
|
||||
return getTime();
|
||||
|
||||
const KartInfo &kart_info = m_kart_info[kart->getWorldKartId()];
|
||||
|
||||
float full_distance = race_manager->getNumLaps()
|
||||
|
Loading…
Reference in New Issue
Block a user