From 406f64694990ca84622205538a72e080499b4464 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 6 Dec 2020 21:28:40 +0300 Subject: pool stuff fix --- src/entities/Building.cpp | 4 ++-- src/entities/Dummy.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/entities') diff --git a/src/entities/Building.cpp b/src/entities/Building.cpp index 921055ce..8035cf25 100644 --- a/src/entities/Building.cpp +++ b/src/entities/Building.cpp @@ -27,14 +27,14 @@ IsBuildingPointerValid(CBuilding* pBuilding) if (!pBuilding) return false; if (pBuilding->GetIsATreadable()) { - int index = CPools::GetTreadablePool()->GetJustIndex((CTreadable*)pBuilding); + int index = CPools::GetTreadablePool()->GetJustIndex_NoFreeAssert((CTreadable*)pBuilding); #ifdef FIX_BUGS return index >= 0 && index < CPools::GetTreadablePool()->GetSize(); #else return index >= 0 && index <= CPools::GetTreadablePool()->GetSize(); #endif } else { - int index = CPools::GetBuildingPool()->GetJustIndex(pBuilding); + int index = CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(pBuilding); #ifdef FIX_BUGS return index >= 0 && index < CPools::GetBuildingPool()->GetSize(); #else diff --git a/src/entities/Dummy.cpp b/src/entities/Dummy.cpp index 544e24a6..580245a8 100644 --- a/src/entities/Dummy.cpp +++ b/src/entities/Dummy.cpp @@ -58,7 +58,7 @@ IsDummyPointerValid(CDummy* pDummy) { if (!pDummy) return false; - int index = CPools::GetDummyPool()->GetJustIndex(pDummy); + int index = CPools::GetDummyPool()->GetJustIndex_NoFreeAssert(pDummy); #ifdef FIX_BUGS if (index < 0 || index >= CPools::GetDummyPool()->GetSize()) #else -- cgit v1.2.3