diff --git a/stepmania/src/ActorCommands.cpp b/stepmania/src/ActorCommands.cpp index 9861f810a8..ecaf415376 100644 --- a/stepmania/src/ActorCommands.cpp +++ b/stepmania/src/ActorCommands.cpp @@ -14,13 +14,6 @@ ActorCommands::ActorCommands( const Commands& cmds ) void ActorCommands::Register() { - if( m_cmds.v.size() == 0 ) - { - LUA->PushNopFunction(); - this->SetFromStack(); - return; - } - // // Convert cmds to a Lua function // diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index db444832bf..febb8dafef 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -59,13 +59,6 @@ void LuaManager::PushStackNil() lua_pushnil( L ); } -void LuaManager::PushNopFunction() -{ - lua_rawgeti( LUA->L, LUA_REGISTRYINDEX, m_iNopFunction ); - - ASSERT_M( !lua_isnil(L, -1), ssprintf("%i", m_iNopFunction) ) -} - void LuaManager::PushStack( int out, lua_State *L ) { if( L == NULL ) @@ -221,10 +214,6 @@ void LuaManager::ResetState() luaopen_string( L ); lua_settop(L, 0); // luaopen_* pushes stuff onto the stack that we don't need - /* Set up the NOP function pointer. */ - RunScript( "return function() end", 1 ); - m_iNopFunction = luaL_ref( L, LUA_REGISTRYINDEX ); - for( const LuaFunctionList *p = g_LuaFunctions; p; p=p->next ) lua_register( L, p->name, p->func ); diff --git a/stepmania/src/LuaManager.h b/stepmania/src/LuaManager.h index 0933ddf83a..780e2669ae 100644 --- a/stepmania/src/LuaManager.h +++ b/stepmania/src/LuaManager.h @@ -58,8 +58,6 @@ public: /* Run an expression. The result is left on the Lua stack. */ bool RunExpression( const CString &str ); lua_State *L; -private: - int m_iNopFunction; }; extern LuaManager *LUA;