"Optional" attrib unused
This commit is contained in:
@@ -219,14 +219,11 @@ void Actor::LoadFromNode( const XNode* pNode )
|
|||||||
if( !pChild->GetAttrValue( "Name", sName ) )
|
if( !pChild->GetAttrValue( "Name", sName ) )
|
||||||
RageException::Throw( "%s: Input: missing the attribute \"Name\"", ActorUtil::GetWhere(pNode).c_str() );
|
RageException::Throw( "%s: Input: missing the attribute \"Name\"", ActorUtil::GetWhere(pNode).c_str() );
|
||||||
|
|
||||||
bool bOptional = false;
|
|
||||||
pChild->GetAttrValue( "Optional", bOptional );
|
|
||||||
|
|
||||||
this->PushSelf( L );
|
this->PushSelf( L );
|
||||||
LuaHelpers::Push( L, sName );
|
LuaHelpers::Push( L, sName );
|
||||||
ActorUtil::GetParam( L, sName );
|
ActorUtil::GetParam( L, sName );
|
||||||
|
|
||||||
if( lua_isnil(L, -1) && !bOptional )
|
if( lua_isnil(L, -1) )
|
||||||
RageException::Throw( "%s: Actor requires parameter \"%s\" that is not set", ActorUtil::GetWhere(pNode).c_str(), sName.c_str() );
|
RageException::Throw( "%s: Actor requires parameter \"%s\" that is not set", ActorUtil::GetWhere(pNode).c_str(), sName.c_str() );
|
||||||
|
|
||||||
lua_settable( L, -3 );
|
lua_settable( L, -3 );
|
||||||
|
|||||||
Reference in New Issue
Block a user