From 8fbd454059118a39711084136510d32913611049 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Sat, 26 Dec 2020 04:08:54 -0700 Subject: [PATCH] Fix rendering in CC2 mode --- js/tileset.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/tileset.js b/js/tileset.js index 35c95ef..86d974c 100644 --- a/js/tileset.js +++ b/js/tileset.js @@ -1246,6 +1246,9 @@ export class Tileset { // out of sync if the player hesitates, but no one will notice that, and this // approach minimizes storing extra state. let i = ((tile.movement_speed - tile.movement_cooldown) + tic % 1 * 3) / tile.movement_speed; + // FIXME hack for cc2 mode, the only place we can see a cooldown of 0 which + // makes i be 1 + i = Math.min(0.999, i); // But do NOT do this for explosions or splashes, which have a fixed duration // and only play once if (this.animation_slowdown > 1 && ! tile.type.ttl) {