diff options
Diffstat (limited to 'engines/mohawk/riven_scripts.cpp')
-rw-r--r-- | engines/mohawk/riven_scripts.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp index d220045779..18c666dbbb 100644 --- a/engines/mohawk/riven_scripts.cpp +++ b/engines/mohawk/riven_scripts.cpp @@ -114,10 +114,6 @@ void RivenScriptManager::clearStoredMovieOpcode() { } void RivenScriptManager::runScript(const RivenScriptPtr &script, bool queue) { - if (!script || script->empty()) { - return; - } - if (!queue) { script->run(); } else { @@ -187,6 +183,16 @@ bool RivenScript::empty() const { return _commands.empty(); } +RivenScript &RivenScript::operator+=(const RivenScript &other) { + _commands.push_back(other._commands); + return *this; +} + +RivenScriptPtr &operator+=(RivenScriptPtr &lhs, const RivenScriptPtr &rhs) { + *lhs += *rhs; + return lhs; +} + RivenCommand::RivenCommand(MohawkEngine_Riven *vm) : _vm(vm) { |