From 887a2da911805fe93b2bd33b39226f433641dee7 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 8 Dec 2015 08:43:15 -0500 Subject: gravity fixes --- src/world.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/world.cpp b/src/world.cpp index 13605da..2bceba5 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -277,10 +277,9 @@ void World::update(Player *p,unsigned int delta){ */ for(auto &e : entity){ - if(e->type != STRUCTURET){ - if(e->canMove) - e->loc.x += e->vel.x * delta; - e->loc.y += e->vel.y * delta; + e->loc.y += e->vel.y * delta; + if(e->type != STRUCTURET && e->canMove){ + e->loc.x += e->vel.x * delta; if(e->vel.x < 0)e->left = true; else if(e->vel.x > 0)e->left = false; } -- cgit v1.2.3