From fcdf2286b61e92c21971fe2442c46e0d58ae6f13 Mon Sep 17 00:00:00 2001 From: BeniS Date: Sun, 30 Dec 2012 20:53:24 +1300 Subject: [PATCH] Fix issue #155 (only tested on pv973) Please let me know if pv870+ works now. Note: * pv = protocol version, * cv = client version For people wondering. --- src/otclient/game.cpp | 3 ++- src/otclient/item.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/otclient/game.cpp b/src/otclient/game.cpp index f4139c30..2acd29ea 100644 --- a/src/otclient/game.cpp +++ b/src/otclient/game.cpp @@ -506,9 +506,10 @@ bool Game::walk(Otc::Direction direction) return false; } - // must add a new walk event + // check we can walk and add new walk event if false if(!m_localPlayer->canWalk(direction)) { if(m_lastWalkDir != direction) { + // must add a new walk event float ticks = m_localPlayer->getStepTicksLeft(); if(ticks < 0) ticks = 0; diff --git a/src/otclient/item.cpp b/src/otclient/item.cpp index 7f2bd685..dcb42744 100644 --- a/src/otclient/item.cpp +++ b/src/otclient/item.cpp @@ -216,9 +216,9 @@ int Item::getSubType() { if(isSplash() || isFluidContainer()) return m_countOrSubType; - if(g_game.getProtocolVersion() >= 900) - return 0; - return 1; + if(m_countOrSubType > 0 && g_game.getProtocolVersion() >= 870) + return 1; + return 0; } int Item::getCount()