Punkline
Dr. Frankenstack
- Joined
- May 15, 2015
- Messages
- 423
J
jra64
requested a code that makes P1 immune to throws.
Achilles1515 had some advice that made this particularly simple to figure out; so I just put something together that intercepts the P1 check for throw collisions. Lemme know if anything doesn't seem to work right~
Edit: made small adjustment to safely load internal player data when other entities are loaded mid-game.
$P1 is Immune to Throws [Punkline]
C2078a6C 00000004
809D002C 8884000C
2C040000 389D0000
40820008 7C641B78
60000000 00000000
Injection Mod for MCM:
ASM:
Achilles1515 had some advice that made this particularly simple to figure out; so I just put something together that intercepts the P1 check for throw collisions. Lemme know if anything doesn't seem to work right~
Edit: made small adjustment to safely load internal player data when other entities are loaded mid-game.
$P1 is Immune to Throws [Punkline]
C2078a6C 00000004
809D002C 8884000C
2C040000 389D0000
40820008 7C641B78
60000000 00000000
Injection Mod for MCM:
Code:
-==-
P1 Immune to Throws
Throw hitboxes have no effect on Player 1
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80078a6C --- 389D0000 -> Branch
809D002C 8884000C
2C040000 389D0000
40820008 7C641B78
00000000
ASM:
Code:
#@80078a6C: addi r4, r29, 0 (passing stored player entity for a function that checks it against r3)
#r25 = stored player that owns "throw" hitbox
#r29 = iterative check against all player entities; will be == player 1 at some point in the loop
#r4 is about to be clobbered, LR and CR0 are safe.
#if r4 == r3, then this iteration of the check is skipped. This is used to nullify P1 (lbz r4, 0xC(r4); cmpwi r4, 0)
lwz r4, 0x2C(r29)
lbz r4, 0xC(r4)
cmpwi r4, 0 #check if "grabbed" player is P1
addi r4, r29, 0 #original instruction
bne return
mr r4, r3
return:
.long 0x00000000
Last edited: