From 311a11e1df32da2228c0a3a8ba476d962af91019 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 7 Mar 2021 20:36:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E8=B8=A2=E5=A2=99=E8=A1=A8?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=83=A8=E5=88=86=E6=96=B9=E5=9D=97=E6=8C=89180?= =?UTF-8?q?=E5=BA=A6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/kickList.lua | 15 ++++++++------- parts/player/player.lua | 7 ++++++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/parts/kickList.lua b/parts/kickList.lua index a657fffb..f115d71a 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -7,7 +7,9 @@ local noKick,noKick_180,pushZero do for _,L in next,t do if type(L)=="table"then for _,v in next,L do - table.insert(v,1,zero) + if not v[1]or v[1][1]~=0 or v[1][2]~=0 then + table.insert(v,1,zero) + end end end end @@ -31,6 +33,7 @@ end local function C_sym(L)--Use this if the block is centrosymmetry, *PTR!!! L[23]=L[01]L[32]=L[10] L[21]=L[03]L[12]=L[30] + L[20]=L[02]L[31]=L[13] end local function flipList(O)--Use this to copy a symmetry list if not O then return end @@ -366,9 +369,7 @@ do [13]={{-1, 0},{ 1, 0}}, [31]={{ 1, 0},{-1, 0}}, },--I2 - { - [01]={},[10]={},[03]={},[30]={}, - },--O1 + nil,--O1 } TRS[2]= reflect(TRS[1])--SZ TRS[4]= reflect(TRS[3])--LJ @@ -377,9 +378,9 @@ do TRS[13]=reflect(TRS[12])--FE TRS[20]=reflect(TRS[19])--L5J5 TRS[22]=reflect(TRS[21])--RY - TRS[24]=reflect(TRS[23])--HN - C_sym(TRS[8])C_sym(TRS[9]) - C_sym(TRS[25])C_sym(TRS[26])C_sym(TRS[29]) + TRS[24]=reflect(TRS[23])--NH + C_sym(TRS[8])C_sym(TRS[9])--S5Z5 + C_sym(TRS[25])C_sym(TRS[26])--I5I3 for i=1,29 do collect(TRS[i])end pushZero(TRS) end diff --git a/parts/player/player.lua b/parts/player/player.lua index 60b7c9fc..553354f4 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -576,10 +576,15 @@ function Player.spin(P,d,ifpre) local iki=P.RS[P.cur.id] if type(iki)=="table"then local idir=(P.cur.dir+d)%4 + iki=iki[P.cur.dir*10+idir] + if not iki then + P:freshBlock("move") + SFX.fieldPlay(ifpre and"prerotate"or"rotate",nil,P) + return + end local icb=BLOCKS[P.cur.id][idir] local isc=SCS[P.cur.id][idir] local ix,iy=P.curX+P.cur.sc[2]-isc[2],P.curY+P.cur.sc[1]-isc[1] - iki=iki[P.cur.dir*10+idir] for test=1,#iki do local x,y=ix+iki[test][1],iy+iki[test][2] if not P:ifoverlap(icb,x,y)and(P.freshTime>=0 or iki[test][2]<0)then