From c4f532fd56e4161c4d72d5ea7fcf285f6642e574 Mon Sep 17 00:00:00 2001 From: Waritnan Sookbuntherng Date: Thu, 12 Oct 2017 23:27:05 +0700 Subject: [PATCH] Pause chase when the game paused --- rwgame/RWGame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rwgame/RWGame.cpp b/rwgame/RWGame.cpp index 9dbd8b3b..e38865ea 100644 --- a/rwgame/RWGame.cpp +++ b/rwgame/RWGame.cpp @@ -464,10 +464,10 @@ int RWGame::run() { void RWGame::tick(float dt) { State* currState = StateManager::get().states.back().get(); - world->chase.update(dt); - static float clockAccumulator = 0.f; if (currState->shouldWorldUpdate()) { + world->chase.update(dt); + // Clear out any per-tick state. world->clearTickData();