Compatibility fix to cv981 new speed law.

* Also a minor fix to setting client version.
This commit is contained in:
BeniS 2012-12-29 02:34:36 +13:00
parent 44e428bccb
commit 034c768994
2 changed files with 6 additions and 3 deletions

View File

@ -672,9 +672,11 @@ Point Creature::getDrawOffset()
int Creature::getStepDuration()
{
int speed = m_speed * 2;
int groundSpeed = 0;
int speed = m_speed;
if(g_game.getFeature(Otc::GameNewSpeedLaw))
speed *= 2;
int groundSpeed = 0;
Position tilePos = m_lastStepToPosition;
if(!tilePos.isValid())
tilePos = m_position;

View File

@ -40,6 +40,7 @@ Game::Game()
{
resetGameStates();
m_protocolVersion = 0;
m_clientVersion = 0;
}
void Game::terminate()
@ -1265,7 +1266,7 @@ void Game::setClientVersion(int version)
if(isOnline())
stdext::throw_exception("Unable to change client version while online");
if(version != 0 && (version < 981 || version > 981))
if(version != 0 && (version < 810 || version > 981))
stdext::throw_exception(stdext::format("Client version %d not supported", version));
m_clientVersion = version;