diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-05-19 16:46:18 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-05-19 16:46:18 +0200 |
commit | 99574ebfc61a79b34f4681eaa2debefbae174875 (patch) | |
tree | a3edae2913a4af9682f7ecfec53367a484c2975c /src/entities/Dummy.cpp | |
parent | Melee weapons(half-working), Ped and Hud bits (diff) | |
parent | Merge pull request #564 from Xinerki/miami (diff) | |
download | re3-99574ebfc61a79b34f4681eaa2debefbae174875.tar re3-99574ebfc61a79b34f4681eaa2debefbae174875.tar.gz re3-99574ebfc61a79b34f4681eaa2debefbae174875.tar.bz2 re3-99574ebfc61a79b34f4681eaa2debefbae174875.tar.lz re3-99574ebfc61a79b34f4681eaa2debefbae174875.tar.xz re3-99574ebfc61a79b34f4681eaa2debefbae174875.tar.zst re3-99574ebfc61a79b34f4681eaa2debefbae174875.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; +} |