Fix animation desync when pressing Z+B

Fixes #18
Found by el pinguino max
This commit is contained in:
MysterD 2020-09-04 21:08:04 -07:00
parent 05674f3d69
commit 4cb13edf84
2 changed files with 6 additions and 1 deletions

View File

@ -1566,7 +1566,7 @@ s32 act_lava_boost(struct MarioState *m) {
}
s32 act_slide_kick(struct MarioState *m) {
if (m->actionState == 0 && m->actionTimer == 0) {
if (m->actionTimer == 0) {
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_HOOHOO);
set_mario_animation(m, MARIO_ANIM_SLIDE_KICK);
}

View File

@ -100,6 +100,11 @@ void network_receive_player(struct Packet* p) {
gMarioStates[1].marioBodyState->punchState = (0 << 6) | 4;
}
}
// action changed, reset timer
if (gMarioStates[1].action != oldAction) {
gMarioStates[1].actionTimer = 0;
}
}
void network_update_player(void) {