summaryrefslogtreecommitdiff
path: root/src/game-server/npc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/npc.cpp')
-rw-r--r--src/game-server/npc.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/game-server/npc.cpp b/src/game-server/npc.cpp
index ce6ac32e..2eb73031 100644
--- a/src/game-server/npc.cpp
+++ b/src/game-server/npc.cpp
@@ -54,11 +54,9 @@ void NPC::update()
return;
Script *script = ScriptManager::currentState();
- script->setMap(getMap());
-
script->prepare(mUpdateCallback);
script->push(this);
- script->execute();
+ script->execute(getMap());
}
void NPC::prompt(Character *ch, bool restart)
@@ -71,7 +69,7 @@ void NPC::prompt(Character *ch, bool restart)
if (restart)
{
Script::Thread *thread = script->newThread();
- thread->mMap = getMap();
+ thread->getContext().map = getMap();
script->prepare(mTalkCallback);
script->push(this);
script->push(ch);