diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-20 15:19:33 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-20 15:19:33 +0200 |
commit | be8e29e4e2dede741516be156dc370376acb13a9 (patch) | |
tree | 8e68c4e5c40b69511dd2c151aa35c917c3062dea /src/core | |
parent | fixed replay (diff) | |
parent | one more fix (diff) | |
download | re3-be8e29e4e2dede741516be156dc370376acb13a9.tar re3-be8e29e4e2dede741516be156dc370376acb13a9.tar.gz re3-be8e29e4e2dede741516be156dc370376acb13a9.tar.bz2 re3-be8e29e4e2dede741516be156dc370376acb13a9.tar.lz re3-be8e29e4e2dede741516be156dc370376acb13a9.tar.xz re3-be8e29e4e2dede741516be156dc370376acb13a9.tar.zst re3-be8e29e4e2dede741516be156dc370376acb13a9.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Collision.cpp | 2 | ||||
-rw-r--r-- | src/core/FileLoader.cpp | 6 | ||||
-rw-r--r-- | src/core/Pad.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/core/Collision.cpp b/src/core/Collision.cpp index 9a8adf46..7982e77d 100644 --- a/src/core/Collision.cpp +++ b/src/core/Collision.cpp @@ -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 diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp index 450cc146..14dc91cd 100644 --- a/src/core/FileLoader.cpp +++ b/src/core/FileLoader.cpp @@ -361,10 +361,10 @@ CFileLoader::LoadClumpFile(const char *filename) nodename = GetFrameNodeName(RpClumpGetFrame(clump)); GetNameAndLOD(nodename, name, &n); mi = (CClumpModelInfo*)CModelInfo::GetModelInfo(name, nil); - assert(mi->IsClump()); - if(mi) + if(mi){ + assert(mi->IsClump()); mi->SetClump(clump); - else + }else RpClumpDestroy(clump); } } diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index 1db50493..736e1e9d 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -1824,7 +1824,7 @@ char *CPad::EditString(char *pStr, int32 nSize) } // numbers - for ( int32 i = 0; i < ('0' - '9' + 1); i++ ) + for ( int32 i = 0; i < ('9' - '0' + 1); i++ ) { if ( GetPad(0)->GetCharJustDown(i + '0') && pos < nSize - 1 ) { |