projects
/
tanks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
47b2977
)
Cap ELAPSED per tick at MS_PER_FRAME.
author
dsc
<david.schoonover@gmail.com>
Sat, 26 Mar 2011 13:39:44 +0000 (06:39 -0700)
committer
dsc
<david.schoonover@gmail.com>
Sat, 26 Mar 2011 13:39:44 +0000 (06:39 -0700)
src/tanks/game.cjs
patch
|
blob
|
history
diff --git
a/src/tanks/game.cjs
b/src/tanks/game.cjs
index
7c6b93d
..
85f0528
100644
(file)
--- 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 = d.elapsed;
+ ELAPSED = this.ELAPSED = Math.min(d.elapsed, MS_PER_FRAME);
TICKS = this.TICKS = d.ticks;
SECONDTH = this.SECONDTH = ELAPSED / 1000;
SQUARETH = this.SQUARETH = REF_SIZE * SECONDTH;