aboutsummaryrefslogtreecommitdiffstats
path: root/src/shooterScreen.c
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-05-06 21:34:38 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-05-06 21:34:38 +0000
commit2e90f9f959b0fcefbea728a00dda8c1cfed222fb (patch)
tree22d3d6004edbd0ffa5a6de4dec027babd57cceab /src/shooterScreen.c
parente9787dccd1cc1f0ef096ecde381f9f817a86260a (diff)
downloadPenguinYippies-2e90f9f959b0fcefbea728a00dda8c1cfed222fb.tar.gz
PenguinYippies-2e90f9f959b0fcefbea728a00dda8c1cfed222fb.tar.bz2
PenguinYippies-2e90f9f959b0fcefbea728a00dda8c1cfed222fb.zip
Jumping is different
Diffstat (limited to 'src/shooterScreen.c')
-rw-r--r--src/shooterScreen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shooterScreen.c b/src/shooterScreen.c
index 6b1322d..b3adb53 100644
--- a/src/shooterScreen.c
+++ b/src/shooterScreen.c
@@ -80,9 +80,9 @@ void updateShooterScreenJump(ShooterScreen* shooterScreen, Game* game)
case 0: // No Jumpy
break;
case 1: // Jump up
- player->velocity.y = PLAYER_JUMP_SPEED;
+ player->velocity.y = PLAYER_JUMP_SPEED * pow(((PLAYER_JUMP_HEIGHT + PLAYER_HEIGHT) - player->position.y), 2.0);
- if (player->position.y >= PLAYER_JUMP_HEIGHT + PLAYER_HEIGHT)
+ if ((int)player->velocity.y == 0)
{
player->jumpStage = 2;
}