Do the same for race event manager for non-stop network
This commit is contained in:
parent
32c1255c10
commit
a071e022a5
@ -25,18 +25,13 @@ RaceEventManager::~RaceEventManager()
|
|||||||
*/
|
*/
|
||||||
void RaceEventManager::update(int ticks)
|
void RaceEventManager::update(int ticks)
|
||||||
{
|
{
|
||||||
// Replay all recorded events up to the current time (only if the
|
// Replay all recorded events up to the current time
|
||||||
// timer isn't stopped, otherwise a potential rewind will trigger
|
// This might adjust dt - if a new state is being played, the dt is
|
||||||
// an infinite loop since world time does not increase)
|
// determined from the last state till 'now'
|
||||||
if (World::getWorld()->getPhase() != WorldStatus::IN_GAME_MENU_PHASE)
|
PROFILER_PUSH_CPU_MARKER("RaceEvent:play event", 100, 100, 100);
|
||||||
{
|
RewindManager::get()->playEventsTill(World::getWorld()->getTimeTicks(),
|
||||||
// This might adjust dt - if a new state is being played, the dt is
|
&ticks);
|
||||||
// determined from the last state till 'now'
|
PROFILER_POP_CPU_MARKER();
|
||||||
PROFILER_PUSH_CPU_MARKER("RaceEvent:play event", 100, 100, 100);
|
|
||||||
RewindManager::get()->playEventsTill(World::getWorld()->getTimeTicks(),
|
|
||||||
&ticks);
|
|
||||||
PROFILER_POP_CPU_MARKER();
|
|
||||||
}
|
|
||||||
World::getWorld()->updateWorld(ticks);
|
World::getWorld()->updateWorld(ticks);
|
||||||
|
|
||||||
// if the race is over
|
// if the race is over
|
||||||
|
Loading…
x
Reference in New Issue
Block a user