Mario Kart Wii Gecko Codes, Cheats, & Hacks

Full Version: Address for checking if player is grounded
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Guys,
Does somebody know of an memory address which tells, whether the player is currently touching the ground? (If it makes any difference, I need this for timetrails)
I tried searching with the Memory Engine for Dolphin, but the addresses I found did only work on one track. It might be that you have to get them over a pointer. In general, what can I do to search for pointers, if I already have the current address?
 
I am using the US NTSC Version (RMCE01) of the game btw.
Thanks in advanced
Check this out: https://github.com/SeekyCt/mkw-structure...yer.h#L235

Although this is a single bit, so you're gonna have to clear all the other ones to check. Here's a sample ASM (feel free to change the registers)

Code:
# NTSC-U Addresses
.set PlayerHolder, 0x809BD110
.set Racedata, 0x809B8F68

# Change this to whatever Exception Vector address you want
.set IsPlayerOnGround, 0x80001500

# Check gamemode == TT
lis r3, Racedata@ha
lwz r3, Racedata@l(r3)
lwz r3, 0xB70(r3)
cmpwi r3, 2
bne+ end

# Get PlayerHolder->players->player[0]->playerSub1c->bitfield0
lis r3, PlayerHolder@ha
lwz r3, PlayerHolder@l(r3)
lwz r3, 0x20(r3)
lwz r3, 0(r3)
lwz r3, 0x20(r3)
lwz r3, 0x4(r3)

# Get bit
rlwinm r3, r3, 14, 31, 31

# Store it
lis r4, IsPlayerOnGround@ha
stb r3, IsPlayerOnGround@l(r4)

# Return
end:
Thank you. Thats exactly what I needed