aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/shooterScreen.c4
-rw-r--r--src/shooterScreen.h4
2 files changed, 4 insertions, 4 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;
}
diff --git a/src/shooterScreen.h b/src/shooterScreen.h
index 720b961..f077ee6 100644
--- a/src/shooterScreen.h
+++ b/src/shooterScreen.h
@@ -7,8 +7,8 @@
#define PLAYER_HEIGHT 2.0
#define PLAYER_SPEED 10.0
-#define PLAYER_JUMP_SPEED 15.0
-#define PLAYER_FALL_SPEED 18.0
+#define PLAYER_JUMP_SPEED 20.0
+#define PLAYER_FALL_SPEED 20.0
#define PLAYER_JUMP_HEIGHT 8.0
#define MOUSE_SPEED 0.01