From 874a4fc2bbf83a65864dc5c34b1a92f28c9674f1 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 22 Sep 2006 19:01:13 +0000 Subject: [PATCH] use ParseActorCommands(L) and RunExpression --- stepmania/src/ThemeManager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 46caa3329c..642efb8670 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -979,15 +979,20 @@ void ThemeManager::GetMetric( const RString &sClassName, const RString &sValueNa { RString sValue = GetMetricRaw( g_pLoadedThemeData->iniMetrics, sClassName, sValueName ); + Lua *L = LUA->Get(); + if( EndsWith(sValueName, "Command") ) { - ActorUtil::ParseActorCommands( sValue, valueOut ); + ActorUtil::ParseActorCommands( L, sValue ); } else { LuaHelpers::PrepareExpression( sValue ); - valueOut.SetFromExpression( sValue ); + LuaHelpers::RunExpression( L, sValue ); } + + valueOut.SetFromStack( L ); + LUA->Release( L ); } #if !defined(SMPACKAGE)