X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FEntity.cpp;h=6b6adaca3561e2d2f8aeeaf15d1eb369ce7b542d;hb=69c74684a16695cc068824129ef82ea37f1b4511;hp=93530f142735021f063f8dab333f66d694680f51;hpb=5d1a76ae7725af998c6ee46adfe492c68ee1d34f;p=l2e.git diff --git a/src/map/Entity.cpp b/src/map/Entity.cpp index 93530f1..6b6adac 100644 --- a/src/map/Entity.cpp +++ b/src/map/Entity.cpp @@ -123,7 +123,7 @@ void Entity::UpdateVelocity() { bool Entity::TileLock(const math::Vector &tileSize) const { // TODO: change position to point to the top-left corner of a tile Vector tilePosition(ToInt(position)); - return (tilePosition.X() % tileSize.X() == 0) && (tilePosition.Y() % tileSize.Y() == 0); + return tilePosition % tileSize == Vector(); }