Commit 9bfed9c2 authored by Edward Jung's avatar Edward Jung Committed by Commit Bot

chrome://dino fix bug where the dino doesn't stop flashing.

Bug happens on the rare occasion that bdayFlashTimer == 0, the dino
keeps on flashing and bday mode never gets set.

Bug: 846473
Change-Id: Iddbe3f9fdba49c540930aac1721cb76a2b137af6
Reviewed-on: https://chromium-review.googlesource.com/1109501Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Edward Jung <edwardjung@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569247}
parent 3db8a184
...@@ -541,7 +541,7 @@ Runner.prototype = { ...@@ -541,7 +541,7 @@ Runner.prototype = {
var deltaTime = now - (this.time || now); var deltaTime = now - (this.time || now);
// Flashing. // Flashing.
if (this.bdayFlashTimer) { if (this.bdayFlashTimer != null) {
if (this.bdayFlashTimer <= 0) { if (this.bdayFlashTimer <= 0) {
this.bdayFlashTimer = null; this.bdayFlashTimer = null;
this.tRex.setFlashing(false); this.tRex.setFlashing(false);
...@@ -865,6 +865,7 @@ Runner.prototype = { ...@@ -865,6 +865,7 @@ Runner.prototype = {
this.tRex.reset(); this.tRex.reset();
this.playSound(this.soundFx.BUTTON_PRESS); this.playSound(this.soundFx.BUTTON_PRESS);
this.invert(true); this.invert(true);
this.bdayFlashTimer = null;
this.update(); this.update();
} }
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment