From 9abaac64741095dfdb0ed5a8a5e3c96d862a4069 Mon Sep 17 00:00:00 2001 From: dsc Date: Sat, 26 Mar 2011 06:43:34 -0700 Subject: [PATCH] Cap ELAPSED per tick at MS_PER_FRAME, so debugging doesn't result in a HUGE step next tick.. --- src/tanks/game.cjs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/tanks/game.cjs b/src/tanks/game.cjs index 85f0528..a213ba9 100644 --- a/src/tanks/game.cjs +++ b/src/tanks/game.cjs @@ -118,7 +118,7 @@ evt.subclass('Game', { this.pathsThisTick = 0; NOW = this.NOW = d.now; - ELAPSED = this.ELAPSED = Math.min(d.elapsed, MS_PER_FRAME); + ELAPSED = this.ELAPSED = Math.min(d.elapsed, MS_PER_FRAME); // Prevent large ELAPSED values when debugging TICKS = this.TICKS = d.ticks; SECONDTH = this.SECONDTH = ELAPSED / 1000; SQUARETH = this.SQUARETH = REF_SIZE * SECONDTH; -- 1.7.0.4