]> git.localhorst.tv Git - l2e.git/commitdiff
don't lock player character onto its tile
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 5 Oct 2012 15:03:33 +0000 (17:03 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 5 Oct 2012 15:03:33 +0000 (17:03 +0200)
src/map/MapState.cpp

index e215f40f872a6b2d36aaca059761e0731c1e2d70..26e20da4948bec91eb126e18fb3e585ae46e923b 100644 (file)
@@ -151,6 +151,10 @@ void MapState::OnGridLock() {
 
 void MapState::LockEntities() {
        for (std::vector<Entity *>::iterator i(entities.begin()), end(entities.end()); i != end; ++i) {
+               if (*i == controlled) {
+                       // don't lock player
+                       continue;
+               }
                (*i)->Position().Lock(map->Tileset()->Size());
        }
 }