File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 1- /* ****************************************************************************
1+ /* ****************************************************************************
22 *
33 * PROJECT: Multi Theft Auto v1.0
44 * LICENSE: See LICENSE in the top level directory
@@ -421,8 +421,26 @@ bool CMultiplayerSA::SetClothingCacheTime(std::uint32_t timeInMs)
421421 if (timeInMs == ms_clumpStore.m_minCacheTime )
422422 return false ;
423423
424- ms_clumpStore.savedClumpList .clear ();
424+ for (auto it = ms_clumpStore.savedClumpList .begin (); it != ms_clumpStore.savedClumpList .end ();)
425+ {
426+ CClumpStore::SSavedClumpInfo& info = *it;
427+
428+ #ifdef CLOTHES_REF_TEST
429+ RpGeometry* pGeometry = ((RpAtomic*)((info.pClump ->atomics .root .next ) - 0x8 ))->geometry ;
430+ pGeometry->refs -= 20 ;
431+ #endif
432+ RpClumpDestroy (info.pClump );
433+
434+ if (info.bUnused )
435+ ms_clumpStore.m_Stats .uiNumUnused --;
436+
437+ ms_clumpStore.m_Stats .uiNumRemoved ++;
438+
439+ it = ms_clumpStore.savedClumpList .erase (it);
440+ }
441+
425442 ms_clumpStore.m_minCacheTime = timeInMs;
443+ ms_clumpStore.m_Stats .uiNumTotal = ms_clumpStore.savedClumpList .size ();
426444
427445 return true ;
428446}
You can’t perform that action at this time.
0 commit comments