diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-12-08 08:43:15 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-12-08 08:43:15 -0500 |
commit | 887a2da911805fe93b2bd33b39226f433641dee7 (patch) | |
tree | c3b992ad306bbdcdd67f90a12a01cba2d7a8bf0d /src | |
parent | 49411238b04f3510d18617d1498622cf199c617d (diff) |
gravity fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/world.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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; } |