fix RunCommandsRecursively by implementing it directly

distinguish between Run ("call this function") and Play
("look up the function with this name and call it")
This commit is contained in:
Glenn Maynard
2007-02-20 23:49:13 +00:00
parent f0c7d92fb5
commit 2fa8986ea6
4 changed files with 33 additions and 1 deletions
+7
View File
@@ -277,6 +277,13 @@ void ActorFrame::PlayCommandOnLeaves( const RString &sCommandName, const LuaRefe
RunCommandsOnLeaves( **pCmd, pParamTable );
}
void ActorFrame::RunCommandsRecursively( const LuaReference& cmds, const LuaReference *pParamTable )
{
for( unsigned i=0; i<m_SubActors.size(); i++ )
m_SubActors[i]->RunCommandsRecursively( cmds, pParamTable );
Actor::RunCommandsRecursively( cmds, pParamTable );
}
void ActorFrame::RunCommandsOnChildren( const LuaReference& cmds, const LuaReference *pParamTable )
{
for( unsigned i=0; i<m_SubActors.size(); i++ )