Skip to content

Commit

Permalink
Update DustPool.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Miner34dev committed Mar 27, 2024
1 parent 55ed015 commit 89cbee2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/main/gfx/DustPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ void DustPool::update()
emit->setTimeToLive(vel * 0.04 / 0.1);
}

const float speedFactor = (App::sim_state->GetEnum<SimState>() == SimState::PAUSED) ? 0.f : App::GetGameContext()->GetActorManager()->GetSimulationSpeed();
SimState currentState = App::sim_state->GetEnum<SimState>();
float simulationSpeed = App::GetGameContext()->GetActorManager()->GetSimulationSpeed();
const float speedFactor = (currentState == SimState::PAUSED) ? 0.f : simulationSpeed;

pss[i]->setSpeedFactor(speedFactor);


Expand Down

0 comments on commit 89cbee2

Please sign in to comment.