Removed spastic decision timer from showing on replays as it was essentially a memory leak when running the way it was
This commit is contained in:
@@ -132,7 +132,7 @@ var GameAnimations = Class.extend({
|
|||||||
var backSideTestingText = element.getAttribute("backSideTestingText");
|
var backSideTestingText = element.getAttribute("backSideTestingText");
|
||||||
|
|
||||||
// Play-out card affects card animation only if it's not the player who initiated it
|
// Play-out card affects card animation only if it's not the player who initiated it
|
||||||
if (this.game.spectatorMode || this.game.replayMode || this.game.replayMode || (participantId != this.game.bottomPlayerId)) {
|
if (this.game.spectatorMode || this.game.replayMode || (participantId != this.game.bottomPlayerId)) {
|
||||||
$("#main").queue(
|
$("#main").queue(
|
||||||
function (next) {
|
function (next) {
|
||||||
for (var i = 0; i < targetCardIds.length; i++) {
|
for (var i = 0; i < targetCardIds.length; i++) {
|
||||||
@@ -958,17 +958,19 @@ var GameAnimations = Class.extend({
|
|||||||
var that = this;
|
var that = this;
|
||||||
$("#main").queue(
|
$("#main").queue(
|
||||||
function (next) {
|
function (next) {
|
||||||
that.game.countdownIntervalId = window.setInterval(function(){
|
if(!that.game.replayMode) {
|
||||||
that.game.totalTime -= 1;
|
that.game.countdownIntervalId = window.setInterval(function(){
|
||||||
that.game.decisionTime += 1;
|
that.game.totalTime -= 1;
|
||||||
|
that.game.decisionTime += 1;
|
||||||
if(that.game.allPlayerIds == null)
|
|
||||||
return;
|
if(that.game.allPlayerIds == null)
|
||||||
|
return;
|
||||||
var index = that.game.getPlayerIndex(that.game.currentPlayerId);
|
|
||||||
$("#clock-1").text(that.game.parseTime(that.game.decisionTime));
|
var index = that.game.getPlayerIndex(that.game.currentPlayerId);
|
||||||
$("#clock" + index).text(that.game.parseTime(that.game.totalTime));
|
$("#clock-1").text(that.game.parseTime(that.game.decisionTime));
|
||||||
}, 1000);
|
$("#clock" + index).text(that.game.parseTime(that.game.totalTime));
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
var decisionType = decision.getAttribute("decisionType");
|
var decisionType = decision.getAttribute("decisionType");
|
||||||
if (decisionType == "INTEGER") {
|
if (decisionType == "INTEGER") {
|
||||||
|
|||||||
Reference in New Issue
Block a user