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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user