summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/being.cpp b/src/being.cpp
index d5ee4a30..4b972e3d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -799,7 +799,7 @@ int Being::getOffset(char pos, char neg) const
if (mAction != WALK || !(mDirection & (pos | neg)))
return 0;
- int offset;
+ int offset = 0;
if (mMap)
{
@@ -809,14 +809,6 @@ int Being::getOffset(char pos, char neg) const
(int)((get_elapsed_time(mWalkTime)
* mMap->getTileHeight()) / mWalkSpeed.y);
}
- else
- {
- offset = (pos == LEFT && neg == RIGHT) ?
- (int)((get_elapsed_time(mWalkTime)
- * DEFAULT_TILE_WIDTH) / mWalkSpeed.x) :
- (int)((get_elapsed_time(mWalkTime)
- * DEFAULT_TILE_HEIGHT) / mWalkSpeed.y);
- }
// We calculate the offset _from_ the _target_ location
offset -= 32;