diff options
Diffstat (limited to 'src/core/Streaming.cpp')
-rw-r--r-- | src/core/Streaming.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index f62ff179..9b8f4a66 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -1084,6 +1084,12 @@ CStreaming::SetMissionDoesntRequireSpecialChar(int32 id) } void +CStreaming::SetAmbientMissionDoesntRequireSpecialChar(int32 id) +{ + return SetAmbientMissionDoesntRequireModel(id + MI_SPECIAL01); +} + +void CStreaming::DecrementRef(int32 id) { ms_numModelsRequested--; @@ -1625,9 +1631,11 @@ CStreaming::SetModelTxdIsDeletable(int32 id) void CStreaming::SetMissionDoesntRequireModel(int32 id) { + if (ms_aInfoForModel[id].m_flags & STREAMFLAGS_SCRIPTOWNED) + printf("SETTING MISSION DOESN'T REQUIRE MODEL %i\n", id); ms_aInfoForModel[id].m_flags &= ~STREAMFLAGS_SCRIPTOWNED; if ((id >= STREAM_OFFSET_TXD || CModelInfo::GetModelInfo(id)->GetModelType() != MITYPE_VEHICLE) && - (ms_aInfoForModel[id].m_flags & STREAMFLAGS_DONT_REMOVE) == 0){ + (ms_aInfoForModel[id].m_flags & (STREAMFLAGS_DONT_REMOVE|STREAMFLAGS_AMBIENT_SCRIPT_OWNED)) == 0){ if(ms_aInfoForModel[id].m_loadState != STREAMSTATE_LOADED) RemoveModel(id); else if(ms_aInfoForModel[id].m_next == nil) @@ -1636,6 +1644,21 @@ CStreaming::SetMissionDoesntRequireModel(int32 id) } void +CStreaming::SetAmbientMissionDoesntRequireModel(int32 id) +{ + if (ms_aInfoForModel[id].m_flags & STREAMFLAGS_AMBIENT_SCRIPT_OWNED) + printf("SETTING AMBIENT MISSION DOESN'T REQUIRE MODEL %i\n", id); + ms_aInfoForModel[id].m_flags &= ~STREAMFLAGS_AMBIENT_SCRIPT_OWNED; + if ((id >= STREAM_OFFSET_TXD || CModelInfo::GetModelInfo(id)->GetModelType() != MITYPE_VEHICLE) && + (ms_aInfoForModel[id].m_flags & (STREAMFLAGS_DONT_REMOVE|STREAMFLAGS_SCRIPTOWNED)) == 0) { + if (ms_aInfoForModel[id].m_loadState != STREAMSTATE_LOADED) + RemoveModel(id); + else if (ms_aInfoForModel[id].m_next == nil) + ms_aInfoForModel[id].AddToList(&ms_startLoadedList); + } +} + +void CStreaming::LoadInitialPeds(void) { RequestModel(MI_COP, STREAMFLAGS_DONT_REMOVE); |