thing fix, no jump walk, but a little slow

master
Henrique 13 years ago
parent 7db6b8b5e6
commit aa682355fa

@ -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;
} }

@ -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);
} }
} }

Loading…
Cancel
Save