Turn race event manager into a singleton get for 2 processes

This commit is contained in:
Benau
2020-02-28 09:43:00 +08:00
parent ccdca532b5
commit 63bad92765
11 changed files with 83 additions and 47 deletions

View File

@@ -291,9 +291,8 @@ void MainLoop::updateRace(int ticks, bool fast_forward)
if (!World::getWorld()) return; // No race on atm - i.e. we are in menu
// The race event manager will update world in case of an online race
if ( RaceEventManager::getInstance() &&
RaceEventManager::getInstance()->isRunning() )
RaceEventManager::getInstance()->update(ticks, fast_forward);
if (RaceEventManager::get() && RaceEventManager::get()->isRunning())
RaceEventManager::get()->update(ticks, fast_forward);
else
World::getWorld()->updateWorld(ticks);
} // updateRace