Fix the rest non-working timer-related function

This commit is contained in:
Benau
2016-07-25 13:48:41 +08:00
parent b903baf226
commit 5a7f3caefd
3 changed files with 3 additions and 3 deletions

View File

@@ -407,7 +407,7 @@ void Powerup::hitBonusBox(const Item &item, int add_info)
{
new_powerup = powerup_manager->getRandomPowerup(position, &n);
if(new_powerup != PowerupManager::POWERUP_RUBBERBALL ||
( World::getWorld()->getTime() - powerup_manager->getBallCollectTime()) >
( World::getWorld()->getTimeSinceStart() - powerup_manager->getBallCollectTime()) >
RubberBall::getTimeBetweenRubberBalls() )
break;
}

View File

@@ -241,7 +241,7 @@ void AIBaseController::crashed(const Material *m)
const unsigned int NUM_COLLISION = 3;
const float COLLISION_TIME = 1.5f;
float time = World::getWorld()->getTime();
float time = World::getWorld()->getTimeSinceStart();
if(m_collision_times.size()==0)
{
m_collision_times.push_back(time);

View File

@@ -1000,7 +1000,7 @@ void Kart::collectedItem(Item *item, int add_info)
*/
float Kart::getStartupBoost() const
{
float t = World::getWorld()->getTime();
float t = World::getWorld()->getTimeSinceStart();
std::vector<float> startup_times = m_kart_properties->getStartupTime();
for (unsigned int i = 0; i < startup_times.size(); i++)
{