summaryrefslogtreecommitdiffstats
path: root/src/control/Script5.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-06 19:28:40 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-06 19:28:40 +0100
commit406f64694990ca84622205538a72e080499b4464 (patch)
treee54e7a35d7ed03b49e52430286c317ae0e88983f /src/control/Script5.cpp
parentquick fix (diff)
downloadre3-406f64694990ca84622205538a72e080499b4464.tar
re3-406f64694990ca84622205538a72e080499b4464.tar.gz
re3-406f64694990ca84622205538a72e080499b4464.tar.bz2
re3-406f64694990ca84622205538a72e080499b4464.tar.lz
re3-406f64694990ca84622205538a72e080499b4464.tar.xz
re3-406f64694990ca84622205538a72e080499b4464.tar.zst
re3-406f64694990ca84622205538a72e080499b4464.zip
Diffstat (limited to '')
-rw-r--r--src/control/Script5.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp
index 7efebb73..1f47c9b9 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -1784,10 +1784,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);
@@ -1805,19 +1805,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;
}
}