[Structs] Adjust GfxBrushModels

This commit is contained in:
momo5502 2017-03-26 18:00:06 +02:00
parent 654b2210ce
commit 6f91b87bdc
3 changed files with 16 additions and 6 deletions

View File

@ -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

View File

@ -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;
}
}

View File

@ -23,6 +23,8 @@ namespace Utils
return reinterpret_cast<T*>(GetProcAddress(this->getModule(), process.data()));
}
void free();
private:
HMODULE module;
bool freeOnDestroy;