File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Client/mods/deathmatch/logic Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,20 @@ void CClientIFP::UnloadIFP ( void )
45
45
for ( size_t i = 0 ; i < m_Animations.size (); i++ )
46
46
{
47
47
IFP_Animation * ifpAnimation = &m_Animations[i];
48
- for (unsigned short SequenceIndex = 0 ; i < ifpAnimation->Hierarchy .m_nSeqCount ; i++)
48
+ if ( isVersion1 )
49
+ {
50
+ for (unsigned short SequenceIndex = 0 ; SequenceIndex < ifpAnimation->Hierarchy .m_nSeqCount ; SequenceIndex++)
51
+ {
52
+
53
+ _CAnimBlendSequence * pSequence = (_CAnimBlendSequence*)((BYTE*)ifpAnimation->Hierarchy .m_pSequences + (sizeof (_CAnimBlendSequence) * SequenceIndex));
54
+ free ( pSequence->m_pFrames );
55
+ }
56
+ }
57
+ else
49
58
{
50
- _CAnimBlendSequence * pSequence = (_CAnimBlendSequence*)((BYTE*)(ifpAnimation->Hierarchy .m_pSequences ) + (sizeof (_CAnimBlendSequence) * SequenceIndex));
51
- free ( pSequence->m_pFrames );
59
+ free ( ifpAnimation->pFramesMemoryVersion2 );
52
60
}
61
+
53
62
delete ifpAnimation->pSequencesMemory ;
54
63
}
55
64
@@ -135,6 +144,8 @@ void CClientIFP::ReadIFPVersion2( bool anp3)
135
144
pAnimHierarchy->m_bRunningCompressed = AnimationNode.isCompressed & 1 ;
136
145
137
146
pKeyFrames = (unsigned char *)malloc (AnimationNode.FrameSize );
147
+
148
+ ifpAnimation.pFramesMemoryVersion2 = pKeyFrames;
138
149
}
139
150
140
151
OLD__CAnimBlendHierarchy_SetName (pAnimHierarchy, AnimationNode.Name );
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ struct IFP_Animation
137
137
_CAnimBlendHierarchy Hierarchy;
138
138
// std::vector <_CAnimBlendSequence> Sequences;
139
139
char * pSequencesMemory;
140
+ unsigned char * pFramesMemoryVersion2; // only for IFP version 2;
140
141
};
141
142
142
143
struct Animation
You can’t perform that action at this time.
0 commit comments