From e68238cbce728d6b7cafb044a65c6b20c013ee5d Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Thu, 9 Dec 2021 22:00:13 -0500 Subject: [PATCH] Fixed disabling saving replays --- tetris/modes/gamemode.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index a1c0ee3..1f41a5f 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -21,7 +21,6 @@ function GameMode:new(secret_inputs) self.random_low, self.random_high = love.math.getRandomSeed() self.random_state = love.math.getRandomState() self.secret_inputs = secret_inputs - self.save_replay = config.gamesettings.save_replay == 1 self.grid = Grid(10, 24) self.randomizer = Randomizer() @@ -114,7 +113,7 @@ function GameMode:initialize(ruleset, replay) self.randomizer or BagRandomizer(table.keys(ruleset.colourscheme)) ) self.ruleset = ruleset - self.save_replay = not replay + self.save_replay = not replay and (config.gamesettings.save_replay == 1) for i = 1, math.max(self.next_queue_length, 1) do table.insert(self.next_queue, self:getNextPiece(ruleset)) end