aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-12-08 08:43:15 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-12-08 08:43:15 -0500
commit887a2da911805fe93b2bd33b39226f433641dee7 (patch)
treec3b992ad306bbdcdd67f90a12a01cba2d7a8bf0d
parent49411238b04f3510d18617d1498622cf199c617d (diff)
gravity fixes
-rw-r--r--Changelog8
-rw-r--r--src/world.cpp7
2 files changed, 11 insertions, 4 deletions
diff --git a/Changelog b/Changelog
index 145d4ec..fbe14bc 100644
--- a/Changelog
+++ b/Changelog
@@ -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;
}