X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FEntity.cpp;h=391c711665dc63e7495dedcc6f13cc6470ee2396;hb=9302f6869530e5492c73ef6f12f9cea348e8b2a6;hp=0e1b822ba32256e920e4767051a5e8f68fbecaec;hpb=1d6a9f01b8db0f5212b6a02603dd0670c6da38c7;p=l2e.git diff --git a/src/map/Entity.cpp b/src/map/Entity.cpp index 0e1b822..391c711 100644 --- a/src/map/Entity.cpp +++ b/src/map/Entity.cpp @@ -55,7 +55,7 @@ void Entity::UpdateVelocity() { bool Entity::TileLock(int width, int height) const { Vector 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 &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); } }