diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-07-05 14:28:58 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-07-05 14:28:58 +0200 |
| commit | a508ce1976caaf8ede6afcea7e8a857399f548ef (patch) | |
| tree | a74648a065e92da70251066a99ecda387a9fe1a2 /src/tools | |
| parent | 6d93a0a810c9d092797a5016738576d03005d1b7 (diff) | |
| parent | d28b66bca88de621fd00495e4edc7e4d9d01e7eb (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Entities/Player/Player.cpp
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Globals/ObjectMgr.cpp
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/vmap4_extractor/model.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/tools/vmap4_extractor/model.cpp b/src/tools/vmap4_extractor/model.cpp index 0f1bde7712d..692939cf288 100644 --- a/src/tools/vmap4_extractor/model.cpp +++ b/src/tools/vmap4_extractor/model.cpp @@ -98,8 +98,19 @@ bool Model::ConvertToVMAPModel(const char * outfilename) wsize = sizeof(uint32) + sizeof(unsigned short) * nIndexes; fwrite(&wsize, sizeof(int), 1, output); fwrite(&nIndexes, sizeof(uint32), 1, output); - if (nIndexes >0) + if (nIndexes > 0) + { + for (uint32 i = 0; i < nIndexes; ++i) + { + if ((i % 3) - 1 == 0 && i + 1 < nIndexes) + { + uint16 tmp = indices[i]; + indices[i] = indices[i + 1]; + indices[i + 1] = tmp; + } + } fwrite(indices, sizeof(unsigned short), nIndexes, output); + } fwrite("VERT", 4, 1, output); wsize = sizeof(int) + sizeof(float) * 3 * nVertices; @@ -107,8 +118,12 @@ bool Model::ConvertToVMAPModel(const char * outfilename) fwrite(&nVertices, sizeof(int), 1, output); if (nVertices >0) { - for(uint32 vpos=0; vpos <nVertices; ++vpos) - std::swap(vertices[vpos].y, vertices[vpos].z); + for (uint32 vpos = 0; vpos < nVertices; ++vpos) + { + float tmp = vertices[vpos].y; + vertices[vpos].y = -vertices[vpos].z; + vertices[vpos].z = tmp; + } fwrite(vertices, sizeof(float)*3, nVertices, output); } |
