From bdcd0dbd561e24476184e35e3bd70186fa3700a4 Mon Sep 17 00:00:00 2001 From: smallmodel <15067410+smallmodel@users.noreply.github.com> Date: Thu, 17 Aug 2023 03:03:26 +0200 Subject: [PATCH] Fixed EventEnd copying and adding pointer value --- code/fgame/scriptthread.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/fgame/scriptthread.cpp b/code/fgame/scriptthread.cpp index 22c8ed09..869effdf 100644 --- a/code/fgame/scriptthread.cpp +++ b/code/fgame/scriptthread.cpp @@ -2703,11 +2703,7 @@ void ScriptThread::EventPause(Event *ev) void ScriptThread::EventEnd(Event *ev) { if (ev->NumArgs() > 0) { - ScriptVariable value = ev->GetValue(1); - - m_ScriptVM->End(value); - - ev->AddValue(value); + m_ScriptVM->End(ev->GetValue(1)); } else { m_ScriptVM->End(); } @@ -2884,7 +2880,8 @@ void ScriptThread::TriggerEvent(Event *ev) void ScriptThread::RegisterAliasAndCache(Event *ev) { - assert(!"ScriptThread::RegisterAliasAndCache needs to be implemented like ClientGameCommandManager::AliasCache"); + //assert(!"ScriptThread::RegisterAliasAndCache needs to be implemented like ClientGameCommandManager::AliasCache"); + gi.DPrintf("ScriptThread::RegisterAliasAndCache needs to be implemented like ClientGameCommandManager::AliasCache"); } void ScriptThread::CacheResourceEvent(Event *ev)