thing fix, no jump walk, but a little slow

This commit is contained in:
Henrique 2011-11-06 19:08:36 -02:00
parent 7db6b8b5e6
commit aa682355fa
2 changed files with 5 additions and 2 deletions

View File

@ -67,6 +67,9 @@ void LocalPlayer::cancelWalk(Otc::Direction direction)
bool LocalPlayer::canWalk(Otc::Direction direction) bool LocalPlayer::canWalk(Otc::Direction direction)
{ {
if(m_walking)
return false;
Position newPos = m_position + Position::getPositionFromDirection(direction); Position newPos = m_position + Position::getPositionFromDirection(direction);
TilePtr tile = g_map.getTile(newPos); TilePtr tile = g_map.getTile(newPos);
if(!tile->isWalkable()) { if(!tile->isWalkable()) {
@ -75,5 +78,5 @@ bool LocalPlayer::canWalk(Otc::Direction direction)
return false; return false;
} }
return !m_clientWalking; return true;
} }

View File

@ -86,7 +86,7 @@ void Tile::draw(const Point& p)
for(const ThingPtr& thing : m_things) { for(const ThingPtr& thing : m_things) {
const ThingType& type = thing->getType(); const ThingType& type = thing->getType();
if(type.isOnTop) if(type.isOnTop)
thing->draw(p.x - m_drawElevation, p.y - m_drawElevation); thing->draw(p.x, p.y);
} }
} }