evaluate TargetNumber as a Lua expression

This commit is contained in:
Chris Danford
2005-02-16 00:16:14 +00:00
parent 40fde98efa
commit 4d31f3b4c1
7 changed files with 29 additions and 9 deletions
+3 -2
View File
@@ -376,7 +376,7 @@ void BGAnimationLayer::LoadFromNode( const CString& sDir, const XNode* pNode )
CString expr;
if( pNode->GetAttrValue("Cond",expr) || pNode->GetAttrValue("Condition",expr) )
{
if( !LUA->RunExpressionB( expr ) )
if( !LUA->RunExpressionB(expr) )
return;
}
}
@@ -672,7 +672,8 @@ bool BGAnimationLayer::EarlyAbortDraw()
if( m_sDrawCond.empty() )
return false;
if( !LUA->RunExpressionB( m_sDrawCond ) )
// TODO: Is it ok to evaluate this every frame?
if( !LUA->RunExpressionB(m_sDrawCond) )
return true;
return false;