mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-09-01 02:41:54 +02:00
CutsceneHead: Don't leak RpHAnimAnimations
This commit is contained in:
committed by
Stefanos Kornilios Mitsis Poiitidis
parent
1c12637506
commit
5984c4f432
@@ -197,6 +197,10 @@ CCutsceneHead::PlayAnimation(const char *animName)
|
|||||||
RwStreamSkip(stream, offset*2048);
|
RwStreamSkip(stream, offset*2048);
|
||||||
if(RwStreamFindChunk(stream, rwID_HANIMANIMATION, nil, nil)){
|
if(RwStreamFindChunk(stream, rwID_HANIMANIMATION, nil, nil)){
|
||||||
anim = RpHAnimAnimationStreamRead(stream);
|
anim = RpHAnimAnimationStreamRead(stream);
|
||||||
|
if (hier->interpolator->currentAnim) {
|
||||||
|
RpHAnimAnimationDestroy(hier->interpolator->currentAnim);
|
||||||
|
hier->interpolator->currentAnim = nil;
|
||||||
|
}
|
||||||
RpHAnimHierarchySetCurrentAnim(hier, anim);
|
RpHAnimHierarchySetCurrentAnim(hier, anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
vendor/librw/src/anim.cpp
vendored
1
vendor/librw/src/anim.cpp
vendored
@@ -221,6 +221,7 @@ AnimInterpolator::setCurrentAnim(Animation *anim)
|
|||||||
{
|
{
|
||||||
int32 i;
|
int32 i;
|
||||||
AnimInterpolatorInfo *interpInfo = anim->interpInfo;
|
AnimInterpolatorInfo *interpInfo = anim->interpInfo;
|
||||||
|
assert(this->currentAnim == nil);
|
||||||
this->currentAnim = anim;
|
this->currentAnim = anim;
|
||||||
this->currentTime = 0.0f;
|
this->currentTime = 0.0f;
|
||||||
int32 maxkf = this->maxInterpKeyFrameSize;
|
int32 maxkf = this->maxInterpKeyFrameSize;
|
||||||
|
Reference in New Issue
Block a user