From bec8f6b86c10217c45fd0073c64dfdec2dae98da Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 3 Jan 2021 22:29:16 +0300 Subject: reorder --- src/control/Script.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/control') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index b03d8403..d71f532d 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -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) { 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) { cleanup_entity_struct* pNew = FindFree(); -- cgit v1.2.3