only override type if it wasn't specified
This commit is contained in:
@@ -64,7 +64,7 @@ Actor* ActorUtil::LoadFromActorFile( const CString& sAniDir, const XNode* pNode
|
|||||||
// Element name is the type in XML.
|
// Element name is the type in XML.
|
||||||
// Type= is the name in INI.
|
// Type= is the name in INI.
|
||||||
CString sType = pNode->m_sName;
|
CString sType = pNode->m_sName;
|
||||||
pNode->GetAttrValue( "Type", sType );
|
bool bHasType = pNode->GetAttrValue( "Type", sType );
|
||||||
|
|
||||||
CString sFile;
|
CString sFile;
|
||||||
pNode->GetAttrValue( "File", sFile );
|
pNode->GetAttrValue( "File", sFile );
|
||||||
@@ -73,8 +73,10 @@ Actor* ActorUtil::LoadFromActorFile( const CString& sAniDir, const XNode* pNode
|
|||||||
CString sText;
|
CString sText;
|
||||||
bool bHasText = pNode->GetAttrValue( "Text", sText );
|
bool bHasText = pNode->GetAttrValue( "Text", sText );
|
||||||
|
|
||||||
|
//
|
||||||
// backward compatibility hacks
|
// backward compatibility hacks
|
||||||
if( bHasText )
|
//
|
||||||
|
if( bHasText && !bHasType )
|
||||||
sType = "BitmapText";
|
sType = "BitmapText";
|
||||||
else if( sFile.CompareNoCase("songbackground") == 0 )
|
else if( sFile.CompareNoCase("songbackground") == 0 )
|
||||||
sType = "SongBackground";
|
sType = "SongBackground";
|
||||||
|
|||||||
Reference in New Issue
Block a user