Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match PlayerJumpInit #651

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ static void PlayerJump(Entity* this) {
}

static void PlayerJumpInit(Entity* this) {
u32 temp;
s32 temp;

this->subAction++;

Expand All @@ -858,8 +858,11 @@ static void PlayerJumpInit(Entity* this) {
this->direction = Direction8FromAnimationState(AnimationStateWalk(this->animationState));

temp = sub_08079FC4(1);
asm("lsl r0, r0, #0x4");
this->zVelocity = (temp - 4) * 64 * 64;

temp <<= 4;
temp -= 4;
temp <<= 12;
this->zVelocity = temp;

this->speed = JUMP_SPEED_FWD;
DeleteClones();
Expand Down Expand Up @@ -2265,11 +2268,13 @@ static void sub_08072B5C(Entity* this) {
sub_08004542(this);
}
this->subAction++;

temp <<= 4;
temp -= 4;
temp <<= 12;
this->zVelocity = temp;
this->speed = Q_8_8(1.0);

this->speed = JUMP_SPEED_FWD;
gPlayerState.animation = ANIM_JUMP;
SoundReq(SFX_PLY_JUMP);
}
Expand Down
Loading