couple of fixes

This commit is contained in:
aap 2019-07-20 14:39:38 +02:00
parent 29d7b983d7
commit 60045ec6cd
9 changed files with 22 additions and 24 deletions

View file

@ -1357,6 +1357,7 @@ CCollision::DistToLine(const CVector *l0, const CVector *l1, const CVector *poin
void
CCollision::CalculateTrianglePlanes(CColModel *model)
{
assert(model);
if(model->numTriangles == 0)
return;
@ -1367,7 +1368,6 @@ CCollision::CalculateTrianglePlanes(CColModel *model)
lptr->Remove();
ms_colModelCache.head.Insert(lptr);
}else{
assert(model);
lptr = ms_colModelCache.Insert(model);
if(lptr == nil){
// make room if we have to, remove last in list