aboutsummaryrefslogtreecommitdiff
path: root/src/game/World.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-05 17:10:59 -0500
committermegamage <none@none>2009-04-05 17:10:59 -0500
commit508a57313c1b99aaf4185390e55eeb4becdae940 (patch)
tree4492bdd07b5da9813293b5cda95a36ff58042b16 /src/game/World.cpp
parent2148e25362fe7140569caf860cc787e014cc39b1 (diff)
parentfef43ddbe7c498be7d154926a88f09c2534f8d48 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/World.cpp')
-rw-r--r--src/game/World.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 4f8797945ff..def0bdf2691 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -1781,7 +1781,7 @@ void World::ForceGameEventUpdate()
}
/// Put scripts in the execution queue
-void World::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, Object* target)
+void World::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, Object* target, bool start)
{
///- Find the script map
ScriptMapMap::const_iterator s = scripts.find(id);
@@ -1809,7 +1809,7 @@ void World::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source,
immedScript = true;
}
///- If one of the effects should be immediate, launch the script execution
- if (immedScript)
+ if (start && immedScript)
ScriptsProcess();
}
@@ -2539,12 +2539,9 @@ void World::ScriptsProcess()
break;
uint32 script_id = step.script->datalong2;
- //delete iter and return it to begin pos(next one)
- m_scriptSchedule.erase(iter);
- iter = m_scriptSchedule.begin();
-
- ScriptsStart(*datamap, script_id, target, NULL);
- return;
+ //insert script into schedule but do not start it
+ ScriptsStart(*datamap, script_id, target, NULL, false);
+ break;
}
case SCRIPT_COMMAND_KILL: