little hanim fix

This commit is contained in:
aap 2020-04-18 00:16:50 +02:00
parent d38ebcd64f
commit 343694329f
1 changed files with 3 additions and 0 deletions

View File

@ -167,6 +167,7 @@ HAnimHierarchy::updateMatrices(void)
else else
rootMat.setIdentity(); rootMat.setIdentity();
parentMat = &rootMat; parentMat = &rootMat;
*sp++ = parentMat;
HAnimNodeInfo *node = this->nodeInfo; HAnimNodeInfo *node = this->nodeInfo;
for(i = 0; i < this->numNodes; i++){ for(i = 0; i < this->numNodes; i++){
anim->applyCB(&animMat, anim->getInterpFrame(i)); anim->applyCB(&animMat, anim->getInterpFrame(i));
@ -177,6 +178,8 @@ HAnimHierarchy::updateMatrices(void)
parentMat = curMat; parentMat = curMat;
if(node->flags & POP) if(node->flags & POP)
parentMat = *--sp; parentMat = *--sp;
assert(sp >= stack);
assert(sp <= &stack[64]);
node++; node++;
curMat++; curMat++;