summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-05 00:15:27 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-05 00:15:27 +0100
commit12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51 (patch)
tree3ceed68ebd672f564c11818efb0a793e43f0acc7 /src/being.cpp
parent81ca2120284ac7fd84e22ee61545b2b789f982e7 (diff)
downloadmana-12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51.tar.gz
mana-12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51.tar.bz2
mana-12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51.tar.xz
mana-12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51.zip
Renamed PATH_NODE to Position as on mainline
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 88063ac1..f9c6296c 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -322,29 +322,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;
}