From 519d6c80b69562f099c262bd32f15498f5b5b931 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 16 Sep 2003 01:12:20 +0000 Subject: [PATCH] Warn for missing textures. --- stepmania/src/Model.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/stepmania/src/Model.cpp b/stepmania/src/Model.cpp index acb3ab6bf5..aca1efb26b 100644 --- a/stepmania/src/Model.cpp +++ b/stepmania/src/Model.cpp @@ -406,12 +406,14 @@ bool Model::LoadMilkshapeAscii( CString sPath ) if( strcmp(Material.szDiffuseTexture, "")!=0 ) { - CString sFile = Material.szDiffuseTexture; - FixSlashesInPlace( sFile ); - CString sPath = sDir + Material.szDiffuseTexture; - CollapsePath( sPath ); - if( IsAFile(sPath) ) - Material.aniTexture.Load( sPath ); + CString sTexturePath = sDir + Material.szDiffuseTexture; + FixSlashesInPlace( sTexturePath ); + CollapsePath( sTexturePath ); + if( IsAFile(sTexturePath) ) + Material.aniTexture.Load( sTexturePath ); + else + LOG->Warn( "\"%s\" references a texture \"%s\" that does not exist", + sPath.c_str(), sTexturePath.c_str() ); } // alpha texture