From 49775b9578303ff29a086d43f2f737754f036fbe Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Sat, 11 Sep 2021 18:19:03 -0400 Subject: [PATCH] Fixed onEnterOrHold running twice on IHS --- tetris/modes/gamemode.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 2017519..a4b7c6b 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -517,10 +517,13 @@ function GameMode:hold(inputs, ruleset, ihs) self:initializeNextPiece(inputs, ruleset, data, false) end self.held = true - if ihs then playSE("ihs") - else playSE("hold") end self:onHold() - self:onEnterOrHold(inputs, ruleset) + if ihs then + playSE("ihs") + else + playSE("hold") + self:onEnterOrHold(inputs, ruleset) + end end function GameMode:onEnterOrHold(inputs, ruleset)