Skip to content

Commit bb4ed12

Browse files
committed
Removed iAnimationSearchReferences.
1 parent 16ed6f5 commit bb4ed12

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

Client/mods/deathmatch/logic/CClientIFP.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ CClientIFP::CClientIFP ( class CClientManager* pManager, ElementID ID ) : CClien
2323
SetTypeName ( "IFP" );
2424
m_bisIFPLoaded = false;
2525
m_pIFPAnimations = nullptr;
26-
iAnimationSearchReferences = 0;
2726
}
2827

2928
CClientIFP::~CClientIFP ( void )
@@ -69,7 +68,7 @@ void CClientIFP::UnloadIFP ( void )
6968
m_pIFPAnimations->bUnloadOnZeroReferences = true;
7069

7170
// unload IFP animations, if reference count is zero
72-
if ( ( m_pIFPAnimations->iReferences == 0 ) && ( iAnimationSearchReferences == 0 ) )
71+
if ( m_pIFPAnimations->iReferences == 0 )
7372
{
7473
g_pClientGame->DeleteIFPAnimations ( m_pIFPAnimations );
7574
}
@@ -1161,18 +1160,17 @@ std::string CClientIFP::getCorrectBoneNameFromName(std::string const& BoneName)
11611160
CAnimBlendHierarchySAInterface * CClientIFP::GetAnimationHierarchy ( const SString & strAnimationName )
11621161
{
11631162
CAnimBlendHierarchySAInterface * pAnimHierarchyInterface = nullptr;
1164-
if ( m_bisIFPLoaded )
1165-
{
1166-
iAnimationSearchReferences ++;
1167-
for (auto it = m_pVecAnimations->begin(); it != m_pVecAnimations->end(); ++it)
1163+
1164+
for (auto it = m_pVecAnimations->begin(); it != m_pVecAnimations->end(); ++it)
1165+
{
1166+
if (strAnimationName.ToLower() == it->Name.ToLower())
11681167
{
1169-
if (strAnimationName.ToLower() == it->Name.ToLower())
1170-
{
1168+
if ( m_bisIFPLoaded )
1169+
{
11711170
pAnimHierarchyInterface = (CAnimBlendHierarchySAInterface *)&it->Hierarchy;
1172-
break;
11731171
}
1172+
break;
11741173
}
1175-
iAnimationSearchReferences --;
11761174
}
11771175
return pAnimHierarchyInterface;
11781176
}

Client/mods/deathmatch/logic/CClientIFP.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class CClientIFP: public CClientEntity, FileLoader
5454
bool isVersion1;
5555
IFPHeaderV2 HeaderV2;
5656
bool m_bisIFPLoaded;
57-
DWORD iAnimationSearchReferences;
5857

5958
};
6059

0 commit comments

Comments
 (0)