diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-05-17 01:37:10 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-17 22:19:06 +0200 |
commit | 91bd2b5862242c88cfe999ee578febf97dc21939 (patch) | |
tree | 9c190a8ee601a0bd05374579eb975df4958d2f4e /src | |
parent | 6e8b4df7f826ce7a6c43b22f67c654a5c4893a1c (diff) | |
download | mana-91bd2b5862242c88cfe999ee578febf97dc21939.tar.gz mana-91bd2b5862242c88cfe999ee578febf97dc21939.tar.bz2 mana-91bd2b5862242c88cfe999ee578febf97dc21939.tar.xz mana-91bd2b5862242c88cfe999ee578febf97dc21939.zip |
Enable and fix path drawing for athena.
Notice that in Being::Logic() we call Being::setPosition() with the added
offset of x+16, y+32, this makes both the Vector Being::mPos and Being::mPx /
Being::mPy not mean the same as pre-merge client. Thus some effects and code
dividing these members with 32 to get the tile coords get wrong results.
Perhaps this all these methods of getting x,y on beings should be cleaned up
so we have 1 method we settle on and store the sprites' fixed x,y offset on
the sprite itself. so we have x + fixed_offset + animation_offset and not all
these magic numbers floating around.
(cherry picked from commit fc6b38d113e7f78af1075a37e1853e00294742e9)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/viewport.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index f92a81b8..2c3f4007 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -195,7 +195,7 @@ void Viewport::draw(gcn::Graphics *gcnGraphics) mMap->drawCollision(graphics, (int) mPixelViewX, (int) mPixelViewY); -#if 0 +#if EATHENA_SUPPORT drawDebugPath(graphics); #endif } @@ -265,8 +265,8 @@ void Viewport::drawDebugPath(Graphics *graphics) const Vector &playerPos = player_node->getPosition(); Path debugPath = mMap->findPath( - (int) playerPos.x / 32, - (int) playerPos.y / 32, + (int) (playerPos.x - 16) / 32, + (int) (playerPos.y - 32) / 32, mouseTileX, mouseTileY, 0xFF); drawPath(graphics, debugPath); |