Fix LoadFallbackB for loading BGAs recursively. LoadFallbackB checking for either LuaThreadVariables or Lua globals is not very clean, but room for possible improvement.

This commit is contained in:
Chris Danford
2008-04-27 00:14:05 +00:00
parent 122473e9b9
commit 82976bc6ef
9 changed files with 107 additions and 45 deletions
+10
View File
@@ -45,6 +45,16 @@ void AutoActor::Load( const RString &sPath )
m_pActor = new Actor;
}
void AutoActor::LoadB( const RString &sMetricsGroup, const RString &sElement )
{
ThemeManager::PathInfo pi;
bool b = THEME->GetPathInfo( pi, EC_BGANIMATIONS, sMetricsGroup, sElement );
ASSERT( b );
LuaThreadVariable var1( "MatchingMetricsGroup", pi.sMatchingMetricsGroup );
LuaThreadVariable var2( "MatchingElement", pi.sMatchingElement );
Load( pi.sResolvedPath );
}
void AutoActor::LoadActorFromNode( const XNode* pNode, Actor *pParent )
{
Unload();