]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Entity.cpp
check blocking flags of tiles in map state
[l2e.git] / src / map / Entity.cpp
index 0e1b822ba32256e920e4767051a5e8f68fbecaec..391c711665dc63e7495dedcc6f13cc6470ee2396 100644 (file)
@@ -55,7 +55,7 @@ void Entity::UpdateVelocity() {
 bool Entity::TileLock(int width, int height) const {
        Vector<int> tilePosition(
                        position.X() - (width / 2),
-                       position.Y() - height);
+                       position.Y());
        return (tilePosition.X() % width == 0) && (tilePosition.Y() % height == 0);
 }
 
@@ -66,10 +66,11 @@ void Entity::Update(float deltaT) {
 
 
 void Entity::Render(SDL_Surface *dest, const Vector<int> &offset) const {
+       // TODO: configurable sprite offsets
        if (animation.Running()) {
-               animation.DrawCenterBottom(dest, offset + position);
+               animation.DrawCenter(dest, offset + position);
        } else {
-               sprite->DrawCenterBottom(dest, offset + position, orientation);
+               sprite->DrawCenter(dest, offset + position, orientation);
        }
 }