This commit is contained in:
Glenn Maynard
2006-07-30 18:43:09 +00:00
parent 4b647827a8
commit f424072441
+6 -10
View File
@@ -253,15 +253,13 @@ void Model::LoadMaterialsFromMilkshapeAscii( const RString &_sPath )
RString sTexturePath = sDir + sDiffuseTexture;
FixSlashesInPlace( sTexturePath );
CollapsePath( sTexturePath );
if( IsAFile(sTexturePath) )
{
Material.diffuse.Load( sTexturePath );
}
else
if( !IsAFile(sTexturePath) )
{
RString sError = ssprintf( "'%s' references a texture '%s' that does not exist", sPath.c_str(), sTexturePath.c_str() );
RageException::Throw( sError );
}
Material.diffuse.Load( sTexturePath );
}
// alpha texture
@@ -280,15 +278,13 @@ void Model::LoadMaterialsFromMilkshapeAscii( const RString &_sPath )
RString sTexturePath = sDir + sAlphaTexture;
FixSlashesInPlace( sTexturePath );
CollapsePath( sTexturePath );
if( IsAFile(sTexturePath) )
{
Material.alpha.Load( sTexturePath );
}
else
if( !IsAFile(sTexturePath) )
{
RString sError = ssprintf( "'%s' references a texture '%s' that does not exist", sPath.c_str(), sTexturePath.c_str() );
RageException::Throw( sError );
}
Material.alpha.Load( sTexturePath );
}
}
}