summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/assimp/code/MD2Loader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/assimp/code/MD2Loader.cpp')
-rw-r--r--src/3rdparty/assimp/code/MD2Loader.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/3rdparty/assimp/code/MD2Loader.cpp b/src/3rdparty/assimp/code/MD2Loader.cpp
index b4c124774..f0a5432bf 100644
--- a/src/3rdparty/assimp/code/MD2Loader.cpp
+++ b/src/3rdparty/assimp/code/MD2Loader.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2016, assimp team
+Copyright (c) 2006-2017, assimp team
+
All rights reserved.
@@ -50,6 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/Importer.hpp>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
+#include <assimp/importerdesc.h>
+
#include <memory>
using namespace Assimp;
@@ -271,11 +274,9 @@ void MD2Importer::InternReadFile( const std::string& pFile,
aiMesh* pcMesh = pScene->mMeshes[0] = new aiMesh();
pcMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
- // navigate to the begin of the frame data
- BE_NCONST MD2::Frame* pcFrame = (BE_NCONST MD2::Frame*) ((uint8_t*)
- m_pcHeader + m_pcHeader->offsetFrames);
-
- pcFrame += configFrameID;
+ // navigate to the begin of the current frame data
+ BE_NCONST MD2::Frame* pcFrame = (BE_NCONST MD2::Frame*) ((uint8_t*)
+ m_pcHeader + m_pcHeader->offsetFrames + (m_pcHeader->frameSize * configFrameID));
// navigate to the begin of the triangle data
MD2::Triangle* pcTriangles = (MD2::Triangle*) ((uint8_t*)