From 21a8c4c0eb44513f89aede04504c2ee67bcea175 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Wed, 20 Feb 2008 13:41:04 +0000 Subject: Fixed a bug which made wandering monsters prefer walking northwest. --- src/game-server/monster.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game-server/monster.cpp') diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp index 4eb90483..c8dc55b5 100644 --- a/src/game-server/monster.cpp +++ b/src/game-server/monster.cpp @@ -243,8 +243,8 @@ void Monster::update() unsigned range = mSpecy->getStrollRange(); if (range) { - Point randomPos(rand() % (range * 2) - range + getPosition().x, - rand() % (range * 2) - range + getPosition().y); + Point randomPos(rand() % (range * 2 + 1) - range + getPosition().x, + rand() % (range * 2 + 1) - range + getPosition().y); setDestination(randomPos); mCountDown = 10 + rand() % 10; } -- cgit v1.2.3-60-g2f50