diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-12-19 01:21:04 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-12-19 01:21:04 +0100 |
commit | 8d1996833bd73271ca14a3df46633d9b2ed13052 (patch) | |
tree | daedb1622096e5bb6b8b9ec15882769b827506e1 /src/collision | |
parent | get rid of all PED_SKIN defines (diff) | |
parent | little cleanup of templates (diff) | |
download | re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.gz re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.bz2 re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.lz re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.xz re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.zst re3-8d1996833bd73271ca14a3df46633d9b2ed13052.zip |
Diffstat (limited to '')
-rw-r--r-- | src/collision/ColModel.cpp | 8 | ||||
-rw-r--r-- | src/collision/TempColModels.cpp | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/collision/ColModel.cpp b/src/collision/ColModel.cpp index ba33c134..d2e01f50 100644 --- a/src/collision/ColModel.cpp +++ b/src/collision/ColModel.cpp @@ -2,6 +2,7 @@ #include "ColModel.h" #include "Collision.h" #include "Game.h" +#include "MemoryHeap.h" #include "Pools.h" CColModel::CColModel(void) @@ -65,10 +66,15 @@ CColModel::RemoveCollisionVolumes(void) void CColModel::CalculateTrianglePlanes(void) { + PUSH_MEMID(MEMID_COLLISION); + // HACK: allocate space for one more element to stuff the link pointer into trianglePlanes = (CColTrianglePlane*)RwMalloc(sizeof(CColTrianglePlane) * (numTriangles+1)); + REGISTER_MEMPTR(&trianglePlanes); for(int i = 0; i < numTriangles; i++) trianglePlanes[i].Set(vertices, triangles[i]); + + POP_MEMID(); } void @@ -198,4 +204,4 @@ CColModel::operator=(const CColModel &other) vertices = nil; } return *this; -}
\ No newline at end of file +} diff --git a/src/collision/TempColModels.cpp b/src/collision/TempColModels.cpp index e7ba54f1..f8b26450 100644 --- a/src/collision/TempColModels.cpp +++ b/src/collision/TempColModels.cpp @@ -41,7 +41,7 @@ CTempColModels::Initialise(void) colmodel.numSpheres = ARRAY_SIZE(sphrs);\ colmodel.spheres = sphrs;\ colmodel.level = LEVEL_GENERIC;\ - colmodel.ownsCollisionVolumes = false;\ + colmodel.ownsCollisionVolumes = false; int i; |