diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index f2755641..032c0c2d 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -3162,10 +3162,10 @@ namespace Game struct GfxBrushModel { GfxBrushModelWritable writable; - float bounds[2][3]; + Bounds bounds; unsigned int surfaceCount; unsigned int startSurfIndex; - int pad; + unsigned int surfaceCountNoDecal; }; struct MaterialMemory diff --git a/src/Utils/Library.cpp b/src/Utils/Library.cpp index c4efb61d..498babac 100644 --- a/src/Utils/Library.cpp +++ b/src/Utils/Library.cpp @@ -9,12 +9,10 @@ namespace Utils Library::~Library() { - if (this->freeOnDestroy && this->valid()) + if (this->freeOnDestroy) { - FreeLibrary(this->getModule()); + this->free(); } - - this->module = nullptr; } bool Library::valid() @@ -26,4 +24,14 @@ namespace Utils { return this->module; } + + void Library::free() + { + if (this->valid()) + { + FreeLibrary(this->getModule()); + } + + this->module = nullptr; + } } diff --git a/src/Utils/Library.hpp b/src/Utils/Library.hpp index 65b8f6dc..c5d8d410 100644 --- a/src/Utils/Library.hpp +++ b/src/Utils/Library.hpp @@ -23,6 +23,8 @@ namespace Utils return reinterpret_cast(GetProcAddress(this->getModule(), process.data())); } + void free(); + private: HMODULE module; bool freeOnDestroy;