diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-06 00:11:06 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-06 00:11:06 +0200 |
commit | 0b104a59fe91ce7bf6d1e0fb131eff509aea9307 (patch) | |
tree | 26c7c2714b495b37df8759596127d68ce4a4e6fa /src/control/Script.cpp | |
parent | colstore support in script (diff) | |
download | re3-0b104a59fe91ce7bf6d1e0fb131eff509aea9307.tar re3-0b104a59fe91ce7bf6d1e0fb131eff509aea9307.tar.gz re3-0b104a59fe91ce7bf6d1e0fb131eff509aea9307.tar.bz2 re3-0b104a59fe91ce7bf6d1e0fb131eff509aea9307.tar.lz re3-0b104a59fe91ce7bf6d1e0fb131eff509aea9307.tar.xz re3-0b104a59fe91ce7bf6d1e0fb131eff509aea9307.tar.zst re3-0b104a59fe91ce7bf6d1e0fb131eff509aea9307.zip |
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r-- | src/control/Script.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index bd64db43..8e522203 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -249,6 +249,21 @@ void CMissionCleanup::CheckIfCollisionHasLoadedForMissionObject() } } +CPhysical* CMissionCleanup::DoesThisEntityWaitForCollision(int i) +{ + if (m_sEntities[i].type == CLEANUP_CAR) { + CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(m_sEntities[i].id); + if (pVehicle && pVehicle->GetStatus() != STATUS_WRECKED) + return pVehicle; + } + else if (m_sEntities[i].type == CLEANUP_CHAR) { + CPed* pPed = CPools::GetPedPool()->GetAt(m_sEntities[i].id); + if (pPed && !pPed->DyingOrDead()) + return pPed; + } + return nil; +} + void CMissionCleanup::Process() { CPopulation::m_AllRandomPedsThisType = -1; |