# HG changeset patch # User zipi # Date 1359301765 0 # Node ID 55e3aa43021d66065a2a19b3eb0f3a9e7578a1ef # Parent 2b90f29892aec4c26efb66889ed8108be585d0e6 quitting game crash fix diff -r 2b90f29892ae -r 55e3aa43021d BSPModel.cpp --- a/BSPModel.cpp Sun Jan 27 14:15:50 2013 +0000 +++ b/BSPModel.cpp Sun Jan 27 15:49:25 2013 +0000 @@ -12,19 +12,19 @@ void *v4; // ST00_4@1 v1 = this; - pAllocator->FreeChunk(*(void **)&this->pModelName[4]); - v2 = *(void **)&v1->pModelName[16]; - *(int *)&v1->pModelName[4] = 0; + pAllocator->FreeChunk(*(void **)&this->pVertices.pVertices); + v2 = v1->pFaces; + v1->pVertices.pVertices = 0; pAllocator->FreeChunk(v2); - v3 = *(void **)&v1->pModelName[20]; - *(int *)&v1->pModelName[16] = 0; + v3 = v1->pFacesOrdering; + v1->pFaces = 0; pAllocator->FreeChunk(v3); - v4 = *(void **)&v1->pModelName[28]; - *(int *)&v1->pModelName[20] = 0; + v4 = v1->pNodes; + v1->pFacesOrdering = 0; pAllocator->FreeChunk(v4); - *(int *)&v1->pModelName[28] = 0; - *(int *)&v1->pModelName[24] = 0; - *(int *)&v1->pModelName[8] = 0; - *(int *)&v1->pModelName[0] = 0; - *(short *)&v1->pModelName[12] = 0; + v1->pNodes = 0; + v1->uNumNodes = 0; + v1->uNumFaces = 0; + v1->pVertices.uNumVertices = 0; + v1->uNumConvexFaces = 0; }