remove parent parameter. Use self:GetParent().
This commit is contained in:
@@ -1014,14 +1014,8 @@ void Actor::RunCommands( const LuaReference& cmds )
|
|||||||
// 1st parameter
|
// 1st parameter
|
||||||
this->PushSelf( L );
|
this->PushSelf( L );
|
||||||
|
|
||||||
// 2nd parameter
|
// call function with 1 argument and 0 results
|
||||||
if( m_pParent )
|
lua_call( L, 1, 0 );
|
||||||
m_pParent->PushSelf( L );
|
|
||||||
else
|
|
||||||
lua_pushnil( L );
|
|
||||||
|
|
||||||
// call function with 2 arguments and 0 results
|
|
||||||
lua_call( L, 2, 0 );
|
|
||||||
|
|
||||||
LUA->Release(L);
|
LUA->Release(L);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ void LuaHelpers::ParseCommandList( Lua *L, const RString &sCommands, const RStri
|
|||||||
//
|
//
|
||||||
ostringstream s;
|
ostringstream s;
|
||||||
|
|
||||||
s << "return function(self,parent)\n";
|
s << "return function(self)\n";
|
||||||
|
|
||||||
FOREACH_CONST( Command, cmds.v, c )
|
FOREACH_CONST( Command, cmds.v, c )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user