Actions

SCHG How-to

Disable floor collision while dying

From Sonic Retro

Revision as of 02:47, 20 June 2012 by KingofHarts (talk | contribs) (Added a new Esrael guide.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is something that you are most likely to notice in Chemical Plant Zone while fighting the Act 2 boss. When your character dies, he will still detect any floor that is still above him, and if the detection returns a collision, the character will stop, and just drop like a rock, instead of move upwards like he normally does. This is not necessarily a bug, though it can be "fixed". Perform this fix if you don't want your character to detect floor tiles while dying.

Find "loc_1E596" (Xenowhirl) or "Floor_ChkTile" (SVN) <asm>

loc_1E596

Floor_ChkTile:

       move.w  d2,d0 
       .... 
       movea.l d1,a1 
       rts 
===========================================================================
precalculated values for Floor_ChkTile
(Sonic 1 calculated it every time instead of using a table)

word_1E5D0: </asm>

and insert the following code: <asm>

loc_1E596

Floor_ChkTile:

       move.w  d2,d0 
       .... 
       movea.l d1,a1 
       cmpi.b  #$06, $0024(A0)   
       bne.s   Player_Not_Death   
       move.l  #$FFFF0000, A1                                                                    

Player_Not_Death:

       rts 
===========================================================================
precalculated values for Floor_ChkTile
(Sonic 1 calculated it every time instead of using a table)

word_1E5D0: </asm>

Your character will no longer detect floor tiles above him when dying.