summaryrefslogtreecommitdiff
path: root/src/game-server/mapcomposite.cpp
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-07-13 16:20:26 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-08-05 23:18:57 +0200
commit05f3249e17121dc79e447b878cbd54e4d51dcdef (patch)
tree2e7e3805ebb09d6d87243791d0c0d7731fbe2308 /src/game-server/mapcomposite.cpp
parent7e77328d1b9f35ed542dd3cfceadb1eb41f54afe (diff)
downloadmanaserv-05f3249e17121dc79e447b878cbd54e4d51dcdef.tar.gz
manaserv-05f3249e17121dc79e447b878cbd54e4d51dcdef.tar.bz2
manaserv-05f3249e17121dc79e447b878cbd54e4d51dcdef.tar.xz
manaserv-05f3249e17121dc79e447b878cbd54e4d51dcdef.zip
Fixed the atinit function
Previously each map had its own scope. They got merged now but the atinit function was forgotten to adapt. Reviewed-by: bjorn.
Diffstat (limited to 'src/game-server/mapcomposite.cpp')
-rw-r--r--src/game-server/mapcomposite.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game-server/mapcomposite.cpp b/src/game-server/mapcomposite.cpp
index 8dd0503e..c3df7202 100644
--- a/src/game-server/mapcomposite.cpp
+++ b/src/game-server/mapcomposite.cpp
@@ -799,6 +799,7 @@ void MapComposite::initializeContent()
if (npcId && !scriptText.empty())
{
Script *script = ScriptManager::currentState();
+ script->setMap(this);
script->loadNPC(object->getName(), npcId,
ManaServ::getGender(gender),
object->getX(), object->getY(),
@@ -815,6 +816,7 @@ void MapComposite::initializeContent()
std::string scriptText = object->getProperty("TEXT");
Script *script = ScriptManager::currentState();
+ script->setMap(this);
if (!scriptFilename.empty())
{