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:
Christian 'ketura' McCarty
2024-12-10 21:17:26 -06:00
parent c88f99afc2
commit 01b1a4aed0

View File

@@ -132,7 +132,7 @@ var GameAnimations = Class.extend({
var backSideTestingText = element.getAttribute("backSideTestingText");
// 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(
function (next) {
for (var i = 0; i < targetCardIds.length; i++) {
@@ -958,17 +958,19 @@ var GameAnimations = Class.extend({
var that = this;
$("#main").queue(
function (next) {
that.game.countdownIntervalId = window.setInterval(function(){
that.game.totalTime -= 1;
that.game.decisionTime += 1;
if(that.game.allPlayerIds == null)
return;
var index = that.game.getPlayerIndex(that.game.currentPlayerId);
$("#clock-1").text(that.game.parseTime(that.game.decisionTime));
$("#clock" + index).text(that.game.parseTime(that.game.totalTime));
}, 1000);
if(!that.game.replayMode) {
that.game.countdownIntervalId = window.setInterval(function(){
that.game.totalTime -= 1;
that.game.decisionTime += 1;
if(that.game.allPlayerIds == null)
return;
var index = that.game.getPlayerIndex(that.game.currentPlayerId);
$("#clock-1").text(that.game.parseTime(that.game.decisionTime));
$("#clock" + index).text(that.game.parseTime(that.game.totalTime));
}, 1000);
}
var decisionType = decision.getAttribute("decisionType");
if (decisionType == "INTEGER") {