diff --git a/src/Components/Modules/AssetInterfaces/IXModel.cpp b/src/Components/Modules/AssetInterfaces/IXModel.cpp index 5249cb7d..78838581 100644 --- a/src/Components/Modules/AssetInterfaces/IXModel.cpp +++ b/src/Components/Modules/AssetInterfaces/IXModel.cpp @@ -166,9 +166,9 @@ namespace Assets for (int i = 0; i < model->numColSurfs; ++i) { - if (model->colSurf[i].tris) + if (model->colSurf[i].collTris) { - model->colSurf[i].tris = reader.read(48, model->colSurf[i].count); + model->colSurf[i].collTris = reader.readArray(model->colSurf[i].numCollTris); } } } @@ -355,12 +355,12 @@ namespace Assets Game::XModelCollSurf* destColSurf = &destColSurfs[i]; Game::XModelCollSurf* colSurf = &asset->colSurf[i]; - if (colSurf->tris) + if (colSurf->collTris) { buffer->align(Utils::Stream::ALIGN_4); - buffer->save(colSurf->tris, 48, colSurf->count); - Utils::Stream::ClearPointer(&destColSurf->tris); + buffer->save(colSurf->collTris, 48, colSurf->numCollTris); + Utils::Stream::ClearPointer(&destColSurf->collTris); } } diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 2f2ade64..f328b46b 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -1676,12 +1676,23 @@ namespace Game float transWeight; }; + struct XModelCollTri_s + { + float plane[4]; + float svec[4]; + float tvec[4]; + }; + struct XModelCollSurf { - void* tris; // +0, sizeof 48 - int count; // +4 - char pad[36]; // +8 - }; // +44 + XModelCollTri_s *collTris; + int numCollTris; + float mins[3]; + float maxs[3]; + int boneIdx; + int contents; + int surfFlags; + }; struct PhysPreset {