Fix infinite rotation exploit.
This commit is contained in:
parent
c5e0c798cd
commit
b0e78d5a6c
BIN
bin/DMGTRIS.GBC
BIN
bin/DMGTRIS.GBC
Binary file not shown.
Binary file not shown.
|
@ -1316,6 +1316,14 @@ FieldProcess::
|
||||||
; Are we grounded?
|
; Are we grounded?
|
||||||
.postgrav
|
.postgrav
|
||||||
.nograv
|
.nograv
|
||||||
|
ldh a, [hYPosAtStartOfFrame]
|
||||||
|
ld b, a
|
||||||
|
ldh a, [hCurrentPieceY]
|
||||||
|
cp a, b
|
||||||
|
jr z, .noreset
|
||||||
|
ldh a, [hCurrentLockDelay]
|
||||||
|
ldh [hCurrentLockDelayRemaining], a
|
||||||
|
.noreset
|
||||||
ldh a, [hCurrentPieceY]
|
ldh a, [hCurrentPieceY]
|
||||||
inc a
|
inc a
|
||||||
ld b, a
|
ld b, a
|
||||||
|
@ -1341,8 +1349,6 @@ FieldProcess::
|
||||||
|
|
||||||
; Play the firm drop sound, and also reset the lock delay since the piece stepped down.
|
; Play the firm drop sound, and also reset the lock delay since the piece stepped down.
|
||||||
.playfirmdropsound
|
.playfirmdropsound
|
||||||
ldh a, [hCurrentLockDelay]
|
|
||||||
ldh [hCurrentLockDelayRemaining], a
|
|
||||||
ldh a, [hCurrentIntegerGravity]
|
ldh a, [hCurrentIntegerGravity]
|
||||||
cp a, 1
|
cp a, 1
|
||||||
jr nz, .postcheckforfirmdropsound
|
jr nz, .postcheckforfirmdropsound
|
||||||
|
@ -1437,10 +1443,8 @@ FieldProcess::
|
||||||
call SFXEnqueue
|
call SFXEnqueue
|
||||||
jr .draw
|
jr .draw
|
||||||
|
|
||||||
; If we weren't grounded, reset the lock delay.
|
; If we weren't grounded, reset the lock force.
|
||||||
.notgrounded
|
.notgrounded
|
||||||
ldh a, [hCurrentLockDelay]
|
|
||||||
ldh [hCurrentLockDelayRemaining], a
|
|
||||||
xor a, a
|
xor a, a
|
||||||
ldh [hShouldLockIfGrounded], a
|
ldh [hShouldLockIfGrounded], a
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue