summaryrefslogtreecommitdiff
path: root/src/game-server/monster.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-02-24 01:12:46 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-02-24 01:12:46 +0100
commitf207bb487da57911350e037d5f894a037fbd74eb (patch)
tree872c96c7eeb1d4b8c3b8c83d76c9095ab445c1a3 /src/game-server/monster.cpp
parent14d0744bc55eaa147d3949891411db5914e2d3ec (diff)
downloadmanaserv-f207bb487da57911350e037d5f894a037fbd74eb.tar.gz
manaserv-f207bb487da57911350e037d5f894a037fbd74eb.tar.bz2
manaserv-f207bb487da57911350e037d5f894a037fbd74eb.tar.xz
manaserv-f207bb487da57911350e037d5f894a037fbd74eb.zip
Made a lot of hard-coded values configuration options
Diffstat (limited to 'src/game-server/monster.cpp')
-rw-r--r--src/game-server/monster.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp
index 14f60c03..70e7ab1f 100644
--- a/src/game-server/monster.cpp
+++ b/src/game-server/monster.cpp
@@ -20,6 +20,7 @@
#include "game-server/monster.hpp"
+#include "common/configuration.hpp"
#include "game-server/character.hpp"
#include "game-server/collisiondetection.hpp"
#include "game-server/item.hpp"
@@ -166,7 +167,8 @@ void Monster::update()
Direction bestAttackDirection = DIRECTION_DOWN;
// Iterate through objects nearby
- for (MovingObjectIterator i(getMap()->getAroundCharacterIterator(this, AROUND_AREA)); i; ++i)
+ int aroundArea = Configuration::getValue("visualRange", 320);
+ for (MovingObjectIterator i(getMap()->getAroundCharacterIterator(this, aroundArea)); i; ++i)
{
// We only want to attack player characters
if ((*i)->getType() != OBJECT_CHARACTER) continue;