FIX: Nasty debug-only bug in FindInstancesProcess.

FIX: Crash at ReplaceCurrentTexture().
FIX: Crash at 'compute smooth normals' in AssimpView.
FIX: Obj shininess is now scaled by 4.0.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@421 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2009-05-16 15:33:01 +00:00
parent 13804abf2e
commit de14e06805
5 changed files with 13 additions and 3 deletions

View File

@@ -134,7 +134,7 @@ void FindInstancesProcess::Execute( aiScene* pScene)
aiMesh* inst = pScene->mMeshes[i];
hashes[i] = GetMeshHash(inst);
for (int a = i-1; a > 0; --a) {
for (int a = i-1; a >= 0; --a) {
if (hashes[i] == hashes[a])
{
aiMesh* orig = pScene->mMeshes[a];
@@ -253,6 +253,7 @@ void FindInstancesProcess::Execute( aiScene* pScene)
// Delete the instanced mesh, we don't need it anymore
delete inst;
pScene->mMeshes[i] = NULL;
break;
}
}