only override type if it wasn't specified

This commit is contained in:
Chris Danford
2005-02-15 20:51:03 +00:00
parent 147151e0b1
commit 6d14988b8a
+4 -2
View File
@@ -64,7 +64,7 @@ Actor* ActorUtil::LoadFromActorFile( const CString& sAniDir, const XNode* pNode
// Element name is the type in XML.
// Type= is the name in INI.
CString sType = pNode->m_sName;
pNode->GetAttrValue( "Type", sType );
bool bHasType = pNode->GetAttrValue( "Type", sType );
CString sFile;
pNode->GetAttrValue( "File", sFile );
@@ -73,8 +73,10 @@ Actor* ActorUtil::LoadFromActorFile( const CString& sAniDir, const XNode* pNode
CString sText;
bool bHasText = pNode->GetAttrValue( "Text", sText );
//
// backward compatibility hacks
if( bHasText )
//
if( bHasText && !bHasType )
sType = "BitmapText";
else if( sFile.CompareNoCase("songbackground") == 0 )
sType = "SongBackground";