Stop world imer when game is paused
This commit is contained in:
parent
020edf1679
commit
929b9b5c20
@ -379,11 +379,16 @@ void WorldStatus::updateTime(const float dt)
|
||||
default: break;
|
||||
}
|
||||
|
||||
IrrlichtDevice *device = irr_driver->getDevice();
|
||||
|
||||
switch (m_clock_mode)
|
||||
{
|
||||
case CLOCK_CHRONO:
|
||||
if (!device->getTimer()->isStopped())
|
||||
{
|
||||
m_time += dt;
|
||||
m_count_up_timer += dt;
|
||||
}
|
||||
break;
|
||||
case CLOCK_COUNTDOWN:
|
||||
// stop countdown when race is over
|
||||
@ -394,8 +399,11 @@ void WorldStatus::updateTime(const float dt)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!device->getTimer()->isStopped())
|
||||
{
|
||||
m_time -= dt;
|
||||
m_count_up_timer += dt;
|
||||
}
|
||||
|
||||
if(m_time <= 0.0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user