]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
gravity fixes
authorClyne Sullivan <tullivan99@gmail.com>
Tue, 8 Dec 2015 13:43:15 +0000 (08:43 -0500)
committerClyne Sullivan <tullivan99@gmail.com>
Tue, 8 Dec 2015 13:43:15 +0000 (08:43 -0500)
Changelog
src/world.cpp

index 145d4ec454f6c6cb86a89cc23afb17cf36ca99b2..fbe14bc4ef7c290936da84115f61e99d5465e813 100644 (file)
--- a/Changelog
+++ b/Changelog
        - 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?
index 13605daaebee234b8a9e09d0025c8b104a868f57..2bceba555490274489f6809880092c710733be74 100644 (file)
@@ -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;
                }