]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Entity.cpp
minor performance improvements
[l2e.git] / src / map / Entity.cpp
index 93530f142735021f063f8dab333f66d694680f51..6b6adaca3561e2d2f8aeeaf15d1eb369ce7b542d 100644 (file)
@@ -123,7 +123,7 @@ void Entity::UpdateVelocity() {
 bool Entity::TileLock(const math::Vector<int> &tileSize) const {
        // TODO: change position to point to the top-left corner of a tile
        Vector<int> tilePosition(ToInt(position));
-       return (tilePosition.X() % tileSize.X() == 0) && (tilePosition.Y() % tileSize.Y() == 0);
+       return tilePosition % tileSize == Vector<int>();
 }