diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-19 00:49:09 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-19 00:49:09 +0200 |
commit | 6510b15704998b14b89fa453ba9d142f85c30dd5 (patch) | |
tree | e194a3641474f3a0818bb4ff2dd139f2c293e804 /src/entities/Dummy.cpp | |
parent | fixes for braking and cloud rotation at high fps (diff) | |
download | re3-6510b15704998b14b89fa453ba9d142f85c30dd5.tar re3-6510b15704998b14b89fa453ba9d142f85c30dd5.tar.gz re3-6510b15704998b14b89fa453ba9d142f85c30dd5.tar.bz2 re3-6510b15704998b14b89fa453ba9d142f85c30dd5.tar.lz re3-6510b15704998b14b89fa453ba9d142f85c30dd5.tar.xz re3-6510b15704998b14b89fa453ba9d142f85c30dd5.tar.zst re3-6510b15704998b14b89fa453ba9d142f85c30dd5.zip |
Diffstat (limited to 'src/entities/Dummy.cpp')
-rw-r--r-- | src/entities/Dummy.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/entities/Dummy.cpp b/src/entities/Dummy.cpp index 8a4bfd5f..92b69761 100644 --- a/src/entities/Dummy.cpp +++ b/src/entities/Dummy.cpp @@ -50,3 +50,18 @@ CDummy::Remove(void) m_entryInfoList.DeleteNode(node); } } + +bool +IsDummyPointerValid(CDummy* pDummy) +{ + if (!pDummy) + return false; + int index = CPools::GetDummyPool()->GetJustIndex(pDummy); +#ifdef FIX_BUGS + if (index < 0 || index >= CPools::GetDummyPool()->GetSize()) +#else + if (index < 0 || index > CPools::GetDummyPool()->GetSize()) +#endif + return false; + return pDummy->m_entryInfoList.first; +} |