fixed timer functions

This commit is contained in:
2025-11-23 18:41:52 +01:00
parent d5fdae397d
commit adec55526e
7 changed files with 100 additions and 22 deletions

View File

@ -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)) {