summaryrefslogtreecommitdiff
path: root/src/game-server/monster.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-08-22 14:10:04 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-08-22 14:10:04 +0200
commit853cbb6efdb79f879fabc2133acb8c11d9d4f7b1 (patch)
treee747ba67e146ad211cf2d18ec468c0e9c22be8e1 /src/game-server/monster.cpp
parent9ea18abb49a760fe1eda197c02cbdcd680b47204 (diff)
downloadmanaserv-853cbb6efdb79f879fabc2133acb8c11d9d4f7b1.tar.gz
manaserv-853cbb6efdb79f879fabc2133acb8c11d9d4f7b1.tar.bz2
manaserv-853cbb6efdb79f879fabc2133acb8c11d9d4f7b1.tar.xz
manaserv-853cbb6efdb79f879fabc2133acb8c11d9d4f7b1.zip
Some coding style tweaks
Diffstat (limited to 'src/game-server/monster.cpp')
-rw-r--r--src/game-server/monster.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp
index ffb178d2..14eeee81 100644
--- a/src/game-server/monster.cpp
+++ b/src/game-server/monster.cpp
@@ -297,20 +297,12 @@ void Monster::update()
void Monster::loadScript(const std::string &scriptName)
{
- if (mScript)
- {
- delete mScript;// A script has already been loaded for this monster
- }
+ // A script may have already been loaded for this monster
+ delete mScript;
+ mScript = 0;
if (scriptName.length() == 0)
- {
- if (mScript)
- {
- delete mScript;
- mScript = NULL;
- }
return;
- }
std::stringstream filename;
filename << "scripts/monster/" << scriptName;
@@ -322,8 +314,6 @@ void Monster::loadScript(const std::string &scriptName)
} else {
LOG_WARN("Could not find script file \"" << filename.str() << "\" for monster");
}
-
-
}
int Monster::calculatePositionPriority(Point position, int targetPriority)