Hi guys,

I noticed that with the assimp version 3.1, loading a .pk3 map would fail to load the lightmaps. This happens also with the test map found at the location assimp/test/models-nonbsd/PK3/SGDTT3.pk3.
I've made a patch with git that fixes this issue and also an assert that fails when loading a .pk3 file.

Could somebody please check out the patch and apply it to the master branch?

Thanks,

iulian

Patch:

From 2b7fe694d08d4288bf98874faef1d58b8ba3ae78 Mon Sep 17 00:00:00 2001
From: Iulian Marinescu Ghetau <giulian2003@gmail.com>
Date: Mon, 5 Oct 2015 22:37:03 +0200
Subject: [PATCH] Fix assert when loading Q3 pk3 files

---
 code/Q3BSPZipArchive.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/code/Q3BSPZipArchive.cpp b/code/Q3BSPZipArchive.cpp
index cc21754..9fb5d17 100644
--- a/code/Q3BSPZipArchive.cpp
+++ b/code/Q3BSPZipArchive.cpp
@@ -292,7 +292,7 @@ bool Q3BSPZipArchive::mapArchive() {
                         // The file has EXACTLY the size of uncompressed_size. In C
                         // you need to mark the last character with '\0', so add
                         // another character
-                        if(unzOpenCurrentFile(m_ZipFileHandle) == UNZ_OK) {
+                       if ((fileInfo.uncompressed_size > 0) && (unzOpenCurrentFile(m_ZipFileHandle) == UNZ_OK)) {
                             std::pair<std::map<std::string, ZipFile*>::iterator, bool> result = m_ArchiveMap.insert(std::make_pair(filename, new ZipFile(fileInfo.uncompressed_size)));

                             if(unzReadCurrentFile(m_ZipFileHandle, result.first->second->m_Buffer, fileInfo.uncompressed_size) == (long int) fileInfo.uncompressed_size) {
-- 
2.5.0.windows.1

From 0b6026f9e1cc6aebd498a5a8aa7603dcb66b5fed Mon Sep 17 00:00:00 2001
From: Iulian Marinescu Ghetau <giulian2003@gmail.com>
Date: Mon, 5 Oct 2015 22:35:22 +0200
Subject: [PATCH] Fix Lightmap Index

---
 code/Q3BSPFileImporter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp
index c27b0c6..b3db51c 100644
--- a/code/Q3BSPFileImporter.cpp
+++ b/code/Q3BSPFileImporter.cpp
@@ -732,7 +732,7 @@ bool Q3BSPFileImporter::importLightmap( const Q3BSP::Q3BSPModel *pModel, aiScene
     name.data[ 0 ] = '*';
     name.length = 1 + ASSIMP_itoa10( name.data + 1, MAXLEN-1,  mTextures.size() );

-    pMatHelper->AddProperty( &name,AI_MATKEY_TEXTURE_LIGHTMAP( 1 ) );
+    pMatHelper->AddProperty( &name,AI_MATKEY_TEXTURE_LIGHTMAP( 0 ) );
     mTextures.push_back( pTexture );

     return true;
-- 
2.5.0.windows.1