Skip to content

Commit 54c1a03

Browse files
committed
IFP pointer is removed first from map then onClientIFPUnload is called
1 parent f4691ad commit 54c1a03

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Client/mods/deathmatch/logic/CClientIFP.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ void CClientIFP::UnloadIFP ( void )
5050
{
5151
printf ("CClientIFP::UnloadIFP ( ) called!\n");
5252

53-
53+
// first remove IFP from map, so we can indicate that it does not exist
54+
g_pClientGame->RemoveIFPPointerFromMap ( m_strBlockName );
55+
56+
// remove IFP animations from replaced animations of peds/players
57+
g_pClientGame->onClientIFPUnload ( *this );
58+
5459
for ( size_t i = 0; i < m_Animations.size(); i++ )
5560
{
5661
IFP_Animation * ifpAnimation = &m_Animations[i];
@@ -80,9 +85,7 @@ void CClientIFP::UnloadIFP ( void )
8085
delete ifpAnimation->pSequencesMemory;
8186
}
8287

83-
g_pClientGame->RemoveIFPPointerFromMap ( m_strBlockName );
84-
85-
printf ("IFP unloaded sucessfully, removed from map as well.\n");
88+
printf ("IFP unloaded sucessfully with block name '%s'\n", m_strBlockName.c_str());
8689
}
8790
}
8891

0 commit comments

Comments
 (0)