diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-11-30 00:15:03 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-11-30 00:15:03 +0100 |
commit | 8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c (patch) | |
tree | 96d47ee1d5f21a833726c197990683663b340e55 /src/control/Script5.cpp | |
parent | Merge pull request #841 from aap/master (diff) | |
download | re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.gz re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.bz2 re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.lz re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.xz re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.tar.zst re3-8f05ccd6c4608172ae4c9a589d2b2c4ce915eb2c.zip |
Diffstat (limited to 'src/control/Script5.cpp')
-rw-r--r-- | src/control/Script5.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp index bada95ea..164ca036 100644 --- a/src/control/Script5.cpp +++ b/src/control/Script5.cpp @@ -1604,10 +1604,10 @@ INITSAVEBUF handle = 0; } else if (pBuilding->GetIsATreadable()) { type = 1; - handle = CPools::GetTreadablePool()->GetJustIndex((CTreadable*)pBuilding) + 1; + handle = CPools::GetTreadablePool()->GetJustIndex_NoFreeAssert((CTreadable*)pBuilding) + 1; } else { type = 2; - handle = CPools::GetBuildingPool()->GetJustIndex(pBuilding) + 1; + handle = CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(pBuilding) + 1; } WriteSaveBuf(buf, type); WriteSaveBuf(buf, handle); @@ -1625,19 +1625,19 @@ INITSAVEBUF case ENTITY_TYPE_BUILDING: if (((CBuilding*)pEntity)->GetIsATreadable()) { type = 1; - handle = CPools::GetTreadablePool()->GetJustIndex((CTreadable*)pEntity) + 1; + handle = CPools::GetTreadablePool()->GetJustIndex_NoFreeAssert((CTreadable*)pEntity) + 1; } else { type = 2; - handle = CPools::GetBuildingPool()->GetJustIndex((CBuilding*)pEntity) + 1; + handle = CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert((CBuilding*)pEntity) + 1; } break; case ENTITY_TYPE_OBJECT: type = 3; - handle = CPools::GetObjectPool()->GetJustIndex((CObject*)pEntity) + 1; + handle = CPools::GetObjectPool()->GetJustIndex_NoFreeAssert((CObject*)pEntity) + 1; break; case ENTITY_TYPE_DUMMY: type = 4; - handle = CPools::GetDummyPool()->GetJustIndex((CDummy*)pEntity) + 1; + handle = CPools::GetDummyPool()->GetJustIndex_NoFreeAssert((CDummy*)pEntity) + 1; default: break; } } |