diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-05 00:15:27 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-05 20:43:04 -0700 |
commit | 4b540f3007e18a85a6d31d301526217393792451 (patch) | |
tree | 0cd424a18cf65505e32507a9c356a7182f0a489d /src/being.cpp | |
parent | b6e7b6c6cb3ea26157e3a78713cc9621dc46b2d7 (diff) | |
download | mana-4b540f3007e18a85a6d31d301526217393792451.tar.gz mana-4b540f3007e18a85a6d31d301526217393792451.tar.bz2 mana-4b540f3007e18a85a6d31d301526217393792451.tar.xz mana-4b540f3007e18a85a6d31d301526217393792451.zip |
Renamed PATH_NODE to Position as on mainline
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 16 |
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; } |