1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-26 18:15:27 +00:00
This commit is contained in:
Nikolay Korolev 2021-01-03 22:29:16 +03:00
parent 29b76fc4f5
commit bec8f6b86c

View file

@ -1673,6 +1673,16 @@ void CMissionCleanup::Init()
} }
} }
cleanup_entity_struct* CMissionCleanup::FindFree()
{
for (int i = 0; i < MAX_CLEANUP; i++){
if (m_sEntities[i].type == CLEANUP_UNUSED)
return &m_sEntities[i];
}
script_assert(0);
return nil;
}
static void SleepThisPed(cleanup_entity_struct* pCleanup, CPed* pPed) static void SleepThisPed(cleanup_entity_struct* pCleanup, CPed* pPed)
{ {
printf("*** SLEEPING PED %i %i\n", pCleanup->id, pPed->GetModelIndex()); printf("*** SLEEPING PED %i %i\n", pCleanup->id, pPed->GetModelIndex());
@ -1690,16 +1700,6 @@ static void WakeThisPed(cleanup_entity_struct* pCleanup, CPed* pPed)
} }
cleanup_entity_struct* CMissionCleanup::FindFree()
{
for (int i = 0; i < MAX_CLEANUP; i++){
if (m_sEntities[i].type == CLEANUP_UNUSED)
return &m_sEntities[i];
}
script_assert(0);
return nil;
}
void CMissionCleanup::AddEntityToList(int32 id, uint8 type) void CMissionCleanup::AddEntityToList(int32 id, uint8 type)
{ {
cleanup_entity_struct* pNew = FindFree(); cleanup_entity_struct* pNew = FindFree();