summaryrefslogtreecommitdiff
path: root/src/game-server
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-07-13 19:20:03 +0200
commit907b740c17a69a487126c63f6ff917d494a25a1f (patch)
tree1271e100408160660ed27fa01dbce6e824b49e60 /src/game-server
parent89847fcbb1befb5b6c31fc42fb3e56d3a2fd6654 (diff)
downloadmanaserv-907b740c17a69a487126c63f6ff917d494a25a1f.tar.gz
manaserv-907b740c17a69a487126c63f6ff917d494a25a1f.tar.bz2
manaserv-907b740c17a69a487126c63f6ff917d494a25a1f.tar.xz
manaserv-907b740c17a69a487126c63f6ff917d494a25a1f.zip
Fixed the atinit function
Previously each map had its own scope. They got merged now but the atinit function was forgotten to adapt.
Diffstat (limited to 'src/game-server')
-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())
{