From 5781bba3aa5764792b25a1d395cac388d001d713 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 26 Sep 2015 16:44:16 -0400 Subject: fixed jumping for real --- src/world.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/world.cpp') diff --git a/src/world.cpp b/src/world.cpp index 44ea10d..cab9ecb 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -121,6 +121,7 @@ void World::singleDetect(Entity *e){ i=(e->loc.x+e->width/2-x_start)/HLINE; // Calculate what line the player is currently on if(e->loc.y<=line[i].y){ // Snap the player to the top of that line if the player is inside it e->vel.y=0; + e->ground=true; e->loc.y=line[i].y+HLINE/2; }else{ // If the player is above the ground do some gravity stuff e->vel.y-=.01; -- cgit v1.2.3