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 | |
parent | 49411238b04f3510d18617d1498622cf199c617d (diff) |
gravity fixes
-rw-r--r-- | Changelog | 8 | ||||
-rw-r--r-- | src/world.cpp | 7 |
2 files changed, 11 insertions, 4 deletions
@@ -380,3 +380,11 @@ - began doxygening headers - fixed entity name reading - fixed entity sprites + +12/8/2015: +========== + + - continued to document header files through doxygen + - added border to dialogBox + - fix entity movement handling; npcs stop when you talk to them + - added sword animation? 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; } |