fixed timer functions
This commit is contained in:
@ -128,16 +128,10 @@ void PlayingState::handleEvent(const SDL_Event& e) {
|
||||
void PlayingState::update(double frameMs) {
|
||||
if (!ctx.game) return;
|
||||
|
||||
static bool debugPrinted = false;
|
||||
if (!debugPrinted) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "[PLAYING] Starting updates, frameMs=%.2f, paused=%d", frameMs, ctx.game->isPaused());
|
||||
debugPrinted = true;
|
||||
}
|
||||
|
||||
// forward per-frame gameplay updates (gravity, elapsed)
|
||||
// forward per-frame gameplay updates (gravity, line effects)
|
||||
if (!ctx.game->isPaused()) {
|
||||
ctx.game->tickGravity(frameMs);
|
||||
ctx.game->addElapsed(frameMs);
|
||||
ctx.game->updateElapsedTime();
|
||||
|
||||
if (ctx.lineEffect && ctx.lineEffect->isActive()) {
|
||||
if (ctx.lineEffect->update(frameMs / 1000.0f)) {
|
||||
|
||||
Reference in New Issue
Block a user