mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-04-28 13:07:59 +03:00
CutsceneHead: Don't leak RpHAnimAnimations
This commit is contained in:
parent
1c12637506
commit
5984c4f432
2 changed files with 5 additions and 0 deletions
|
@ -197,6 +197,10 @@ CCutsceneHead::PlayAnimation(const char *animName)
|
|||
RwStreamSkip(stream, offset*2048);
|
||||
if(RwStreamFindChunk(stream, rwID_HANIMANIMATION, nil, nil)){
|
||||
anim = RpHAnimAnimationStreamRead(stream);
|
||||
if (hier->interpolator->currentAnim) {
|
||||
RpHAnimAnimationDestroy(hier->interpolator->currentAnim);
|
||||
hier->interpolator->currentAnim = nil;
|
||||
}
|
||||
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;
|
||||
AnimInterpolatorInfo *interpInfo = anim->interpInfo;
|
||||
assert(this->currentAnim == nil);
|
||||
this->currentAnim = anim;
|
||||
this->currentTime = 0.0f;
|
||||
int32 maxkf = this->maxInterpKeyFrameSize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue