Update screenshake position in fixed-timestep loop

Otherwise the screen will shake too fast for my liking.

Also I'm planning to add an FPS limiting option later (because right
now, un-capping the FPS is pretty wasteful and eats up lots of
resources, especially since I have only a 60hz monitor), and it'd feel
weird if screen shaking updated every delta timestep.
This commit is contained in:
Misa
2020-04-28 17:29:59 -07:00
committed by Ethan Lee
parent 57f87dc820
commit 8fde6f28a3
3 changed files with 16 additions and 7 deletions

View File

@@ -471,6 +471,7 @@ int main(int argc, char *argv[])
if (game.infocus && game.screenshake > 0)
{
game.screenshake--;
graphics.updatescreenshake();
}
//We did editorinput, now it's safe to turn this off