Skip to content

Commit 9de0774

Browse files
committed
custom IFP pointer is removed from map container when unloaded.
1 parent 0ba8e13 commit 9de0774

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Client/mods/deathmatch/logic/CClientIFP.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ bool CClientIFP::LoadIFP ( const char* szFilePath, SString strBlockName )
3232
m_strBlockName = strBlockName;
3333

3434
return LoadIFPFile ( szFilePath );
35-
36-
// Failed
37-
//return false;
3835
}
3936

4037
// Temporary method to avoid memory leaks, we'll need to rewrite the entire thing ;)
@@ -67,12 +64,13 @@ void CClientIFP::UnloadIFP ( void )
6764
free ( pKeyFrames );
6865
}
6966

70-
printf ("IFP unloaded sucessfully\n");
67+
g_pClientGame->RemoveIFPPointerFromMap ( m_strBlockName );
68+
printf ("IFP unloaded sucessfully, removed from map as well.\n");
7169
}
7270

7371
bool CClientIFP::LoadIFPFile(const char * FilePath)
7472
{
75-
createLoader(FilePath);
73+
createLoader ( FilePath );
7674

7775
if (loadFile())
7876
{
@@ -107,11 +105,7 @@ bool CClientIFP::LoadIFPFile(const char * FilePath)
107105
return false;
108106
}
109107

110-
// We need to keep this IFP somewhere, for now, insert into Animation Manager map here.
111-
//g_IFPs.push_back(IFPElement);
112-
113108
printf("Exiting LoadIFPFile function\n");
114-
//ofs << "Exiting LoadIFPFile function" << std::endl;
115109

116110
return true;
117111
}

0 commit comments

Comments
 (0)