use GetAttrPath
This commit is contained in:
@@ -233,9 +233,8 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor *
|
|||||||
{
|
{
|
||||||
// automatically figure out the type
|
// automatically figure out the type
|
||||||
RString sFile;
|
RString sFile;
|
||||||
pNode->GetAttrValue( "File", sFile );
|
ActorUtil::GetAttrPath( pNode, "File", sFile );
|
||||||
|
|
||||||
bool bIsAbsolutePath = sFile.Left(1) == "/";
|
|
||||||
FixSlashesInPlace( sFile );
|
FixSlashesInPlace( sFile );
|
||||||
|
|
||||||
/* Be careful: if sFile is "", and we don't check it, then we can end up recursively
|
/* Be careful: if sFile is "", and we don't check it, then we can end up recursively
|
||||||
@@ -249,11 +248,9 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor *
|
|||||||
goto all_done;
|
goto all_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
RString sNewPath = bIsAbsolutePath ? sFile : sDir+sFile;
|
ActorUtil::ResolvePath( sFile, sDir );
|
||||||
|
|
||||||
ActorUtil::ResolvePath( sNewPath, sDir );
|
pReturn = ActorUtil::MakeActor( sFile, pNode, pParentActor );
|
||||||
|
|
||||||
pReturn = ActorUtil::MakeActor( sNewPath, pNode, pParentActor );
|
|
||||||
if( pReturn == NULL )
|
if( pReturn == NULL )
|
||||||
goto all_done;
|
goto all_done;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user