diff options
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/world.cpp b/src/world.cpp index 1e37a78..13605da 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -277,11 +277,13 @@ void World::update(Player *p,unsigned int delta){ */ for(auto &e : entity){ - if(e->type != STRUCTURET) - e->loc.x += e->vel.x * delta; + if(e->type != STRUCTURET){ + if(e->canMove) + e->loc.x += e->vel.x * delta; e->loc.y += e->vel.y * delta; if(e->vel.x < 0)e->left = true; else if(e->vel.x > 0)e->left = false; + } } } |