Skip to content

Commit 43046a3

Browse files
committed
修复对战和stack_e中hold致死但没有完全死的时候下一块悬空导致的幽灵行
1 parent fe29cc5 commit 43046a3

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

parts/eventsets/stack_e.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ return {
2626
P.garbageBeneath=P.garbageBeneath-bonus
2727
end
2828
end
29+
P:freshBlock('push')
2930
end
3031
end,
3132
}

parts/player/player.lua

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local resume,yield,status=coroutine.resume,coroutine.yield,coroutine.status
1111
local approach=MATH.expApproach
1212

1313
local SFX,BGM,VOC,VIB,SYSFX=SFX,BGM,VOC,VIB,SYSFX
14-
local FREEROW,TABLE,TEXT,TASK=LINE,TABLE,TEXT,TASK
14+
local LINE,TABLE,TEXT,TASK=LINE,TABLE,TEXT,TASK
1515
local PLAYERS,PLY_ALIVE,GAME=PLAYERS,PLY_ALIVE,GAME
1616

1717
local SETTING=SETTING
@@ -721,8 +721,8 @@ function Player:garbageRise(color,amount,line)-- Release n-lines garbage to fiel
721721
local _
722722
local t=self.showTime*2
723723
for _=1,amount do
724-
ins(self.field,1,FREEROW.new(0,true))
725-
ins(self.visTime,1,FREEROW.new(t))
724+
ins(self.field,1,LINE.new(0,true))
725+
ins(self.visTime,1,LINE.new(t))
726726
for i=1,10 do
727727
self.field[1][i]=bit.rshift(line,i-1)%2==1 and color or 0
728728
end
@@ -760,7 +760,7 @@ function Player:pushLineList(L,mir)-- Push some lines to field
760760
local l=#L
761761
local S=self.gameEnv.skin
762762
for i=1,l do
763-
local r=FREEROW.new(0)
763+
local r=LINE.new(0)
764764
if not mir then
765765
for j=1,10 do
766766
r[j]=S[L[i][j]] or 0
@@ -771,7 +771,7 @@ function Player:pushLineList(L,mir)-- Push some lines to field
771771
end
772772
end
773773
ins(self.field,1,r)
774-
ins(self.visTime,1,FREEROW.new(20))
774+
ins(self.visTime,1,LINE.new(20))
775775
end
776776
self.fieldBeneath=self.fieldBeneath+30*l
777777
if self.cur then
@@ -1010,8 +1010,8 @@ function Player:lock()
10101010
for i=1,#CB do
10111011
local y=self.curY+i-1
10121012
if not self.field[y] then
1013-
self.field[y]=FREEROW.new(0)
1014-
self.visTime[y]=FREEROW.new(0)
1013+
self.field[y]=LINE.new(0)
1014+
self.visTime[y]=LINE.new(0)
10151015
end
10161016
for j=1,#CB[1] do
10171017
if CB[i][j] then
@@ -1079,8 +1079,8 @@ function Player:_removeClearedLines()
10791079
if self.field[h].garbage then
10801080
self.garbageBeneath=self.garbageBeneath-1
10811081
end
1082-
FREEROW.discard(rem(self.field,h))
1083-
FREEROW.discard(rem(self.visTime,h))
1082+
LINE.discard(rem(self.field,h))
1083+
LINE.discard(rem(self.visTime,h))
10841084
end
10851085
end
10861086
function Player:_updateFalling(val)
@@ -2196,8 +2196,8 @@ local function task_lose(self)
21962196
end
21972197
if self.endCounter==120 then
21982198
for _=#self.field,1,-1 do
2199-
FREEROW.discard(self.field[_])
2200-
FREEROW.discard(self.visTime[_])
2199+
LINE.discard(self.field[_])
2200+
LINE.discard(self.visTime[_])
22012201
self.field[_],self.visTime[_]=nil
22022202
end
22032203
return
@@ -2763,8 +2763,8 @@ end
27632763
function Player:revive()
27642764
local h=#self.field
27652765
for _=h,1,-1 do
2766-
FREEROW.discard(self.field[_])
2767-
FREEROW.discard(self.visTime[_])
2766+
LINE.discard(self.field[_])
2767+
LINE.discard(self.visTime[_])
27682768
self.field[_],self.visTime[_]=nil
27692769
end
27702770
self.garbageBeneath=0
@@ -2777,6 +2777,7 @@ function Player:revive()
27772777
self.life=self.life-1
27782778
self.fieldBeneath=0
27792779
self.b2b=0
2780+
self:freshBlock('push')
27802781

27812782
for i=1,h do
27822783
self:createClearingFX(i)

0 commit comments

Comments
 (0)