summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 07895eb2..aff52757 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -351,29 +351,29 @@ void Being::nextStep()
return;
}
- PATH_NODE node = mPath.front();
+ Position pos = mPath.front();
mPath.pop_front();
int dir = 0;
- if (node.x > mX)
+ if (pos.x > mX)
dir |= RIGHT;
- else if (node.x < mX)
+ else if (pos.x < mX)
dir |= LEFT;
- if (node.y > mY)
+ if (pos.y > mY)
dir |= DOWN;
- else if (node.y < mY)
+ else if (pos.y < mY)
dir |= UP;
setDirection(dir);
- if (mMap->tileCollides(node.x, node.y))
+ if (mMap->tileCollides(pos.x, pos.y))
{
setAction(STAND);
return;
}
- mX = node.x;
- mY = node.y;
+ mX = pos.x;
+ mY = pos.y;
setAction(WALK);
mWalkTime += mWalkSpeed / 10;
}