diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 2c18209a..375f0f49 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -782,7 +782,7 @@ function draw.norm(P,repMode) _drawFXs(P) --Draw current block - if P.alive and P.cur then + if P.alive and P.control and P.cur then local C=P.cur local curColor=C.color diff --git a/parts/player/player.lua b/parts/player/player.lua index dec52b62..51dd87b7 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -217,6 +217,7 @@ function Player:_deepDrop() end end function Player:act_moveLeft(auto) + if not self.control then return end if not auto then self.ctrlCount=self.ctrlCount+1 end @@ -238,6 +239,7 @@ function Player:act_moveLeft(auto) end end function Player:act_moveRight(auto) + if not self.control then return end if not auto then self.ctrlCount=self.ctrlCount+1 end @@ -259,6 +261,7 @@ function Player:act_moveRight(auto) end end function Player:act_rotRight() + if not self.control then return end if self.cur then self.ctrlCount=self.ctrlCount+1 self:spin(1) @@ -266,6 +269,7 @@ function Player:act_rotRight() end end function Player:act_rotLeft() + if not self.control then return end if self.cur then self.ctrlCount=self.ctrlCount+1 self:spin(3) @@ -273,6 +277,7 @@ function Player:act_rotLeft() end end function Player:act_rot180() + if not self.control then return end if self.cur then self.ctrlCount=self.ctrlCount+2 self:spin(2) @@ -280,6 +285,7 @@ function Player:act_rot180() end end function Player:act_hardDrop() + if not self.control then return end local ENV=self.gameEnv if self.cur then if self.lastPiece.autoLock and self.frameRun-self.lastPiece.frameself.ghoY then @@ -325,6 +332,7 @@ function Player:act_softDrop() end end function Player:act_hold() + if not self.control then return end if self.cur then if self:hold()then self.keyPressing[8]=false @@ -332,13 +340,16 @@ function Player:act_hold() end end function Player:act_func1() + if not self.control then return end self.gameEnv.fkey1(self) end function Player:act_func2() + if not self.control then return end self.gameEnv.fkey2(self) end function Player:act_insLeft(auto) + if not self.control then return end if not self.cur then return end @@ -364,6 +375,7 @@ function Player:act_insLeft(auto) end end function Player:act_insRight(auto) + if not self.control then return end if not self.cur then return end @@ -389,6 +401,7 @@ function Player:act_insRight(auto) end end function Player:act_insDown() + if not self.control then return end if self.cur and self.curY>self.ghoY then local ENV=self.gameEnv self:createDropFX() @@ -403,6 +416,7 @@ function Player:act_insDown() end end function Player:act_down1() + if not self.control then return end if self.cur then if self.curY>self.ghoY then self:createMoveFX('down') @@ -415,6 +429,7 @@ function Player:act_down1() end end function Player:act_down4() + if not self.control then return end if self.cur then if self.curY>self.ghoY then local ghoY0=self.ghoY @@ -429,6 +444,7 @@ function Player:act_down4() end end function Player:act_down10() + if not self.control then return end if self.cur then if self.curY>self.ghoY then local ghoY0=self.ghoY @@ -443,18 +459,21 @@ function Player:act_down10() end end function Player:act_dropLeft() + if not self.control then return end if self.cur then self:act_insLeft() self:act_hardDrop() end end function Player:act_dropRight() + if not self.control then return end if self.cur then self:act_insRight() self:act_hardDrop() end end function Player:act_zangiLeft() + if not self.control then return end if self.cur then self:act_insLeft() self:act_insDown() @@ -463,6 +482,7 @@ function Player:act_zangiLeft() end end function Player:act_zangiRight() + if not self.control then return end if self.cur then self:act_insRight() self:act_insDown()