@@ -4090,7 +4090,7 @@ bool CClientGame::BlendAnimationHierarchyHandler ( SIFPAnimations ** pOutIFPAni
40904090 if ( pClientPed->isNextAnimationCustom () )
40914091 {
40924092 const SString & strBlockName = pClientPed->GetNextAnimationCustomBlockName ( );
4093- CClientIFP * pIFP = GetIFPPointerFromMap ( strBlockName );
4093+ std::shared_ptr < CClientIFP > pIFP = GetIFPPointerFromMap ( strBlockName );
40944094 if ( pIFP )
40954095 {
40964096 const SString & strAnimationName = pClientPed->GetNextAnimationCustomName ( );
@@ -6859,7 +6859,7 @@ void CClientGame::RestreamModel ( unsigned short usModel )
68596859
68606860}
68616861
6862- void CClientGame::InsertIFPPointerToMap ( const SString & strBlockName, CClientIFP * pIFP )
6862+ void CClientGame::InsertIFPPointerToMap ( const SString & strBlockName, const std::shared_ptr < CClientIFP > & pIFP )
68636863{
68646864 const SString mapKey = strBlockName.ToLower ( );
68656865 if ( m_mapOfIfpPointers.count ( mapKey ) == 0 )
@@ -6873,17 +6873,18 @@ void CClientGame::RemoveIFPPointerFromMap ( const SString & strBlockName )
68736873 m_mapOfIfpPointers.erase ( strBlockName.ToLower ( ) );
68746874}
68756875
6876- CClientIFP * CClientGame::GetIFPPointerFromMap ( const SString & strBlockName )
6876+ std::shared_ptr < CClientIFP > CClientGame::GetIFPPointerFromMap ( const SString & strBlockName )
68776877{
68786878 const SString mapKey = strBlockName.ToLower ( );
6879- std::map < SString, CClientIFP * >::iterator it = m_mapOfIfpPointers.find ( mapKey );
6879+ auto it = m_mapOfIfpPointers.find ( mapKey );
68806880 if ( it != m_mapOfIfpPointers.end ( ) )
68816881 {
68826882 return it->second ;
68836883 }
68846884 return nullptr ;
68856885}
68866886
6887+
68876888void CClientGame::InsertPedPointerToMap ( CClientPed * pPed )
68886889{
68896890 if ( m_mapOfPedPointers.count ( pPed ) == 0 )
@@ -6917,7 +6918,7 @@ CClientPed * CClientGame::GetClientPedByClump ( const RpClump & Clump )
69176918 return nullptr ;
69186919}
69196920
6920- void CClientGame::OnClientIFPUnload ( const CClientIFP & IFP )
6921+ void CClientGame::OnClientIFPUnload ( const std::shared_ptr < CClientIFP > & IFP )
69216922{
69226923 // remove IFP animations from replaced animations of peds/players
69236924 for ( auto it = m_mapOfPedPointers.begin (); it != m_mapOfPedPointers.end (); it++ )
0 commit comments