Skip to content

Commit bc0d47e

Browse files
committed
gravity is slightly stronger when you fall
1 parent 435792c commit bc0d47e

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

objects/obj_player/Create_0.gml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ self.state.add("default", {
4343
self.direction = 360 - self.camera.direction;
4444

4545
// properly do this later
46-
static grav = 9;
47-
self.yspeed -= grav * PDT;
46+
static grav_up = 12;
47+
static grav_down = grav_up * 1.8;
48+
49+
if (self.yspeed > 0) {
50+
self.yspeed -= grav_up * PDT;
51+
} else {
52+
self.yspeed -= grav_down * PDT;
53+
}
4854

4955
self.HandleMovement();
5056
self.HandleClimbing();

0 commit comments

Comments
 (0)