From e76a9c8965fb6c148eaf04517fb18dbf60806ebe Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 23 Oct 2006 09:14:27 +0000 Subject: [PATCH] remove parent parameter. Use self:GetParent(). --- stepmania/src/Actor.cpp | 10 ++-------- stepmania/src/LuaManager.cpp | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 32d0bd5e92..4a35b23cfb 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -1014,14 +1014,8 @@ void Actor::RunCommands( const LuaReference& cmds ) // 1st parameter this->PushSelf( L ); - // 2nd parameter - if( m_pParent ) - m_pParent->PushSelf( L ); - else - lua_pushnil( L ); - - // call function with 2 arguments and 0 results - lua_call( L, 2, 0 ); + // call function with 1 argument and 0 results + lua_call( L, 1, 0 ); LUA->Release(L); } diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index 8a402e29fc..72226131df 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -609,7 +609,7 @@ void LuaHelpers::ParseCommandList( Lua *L, const RString &sCommands, const RStri // ostringstream s; - s << "return function(self,parent)\n"; + s << "return function(self)\n"; FOREACH_CONST( Command, cmds.v, c ) {