diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/game-server/monster.cpp | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2008-02-20 Philipp Sehmisch <tmw@crushnet.org> + + * src/game-server/monster.cpp: Fixed a bug which made wandering + monsters prefer walking northwest. + 2008-02-13 Philipp Sehmisch <tmw@crushnet.org> * src/game-server/monstermanager.cpp: Movement speed in monsters.xml 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; } |