diff options
Diffstat (limited to '')
-rw-r--r-- | src/animation/AnimBlendAssocGroup.cpp | 13 | ||||
-rw-r--r-- | src/animation/AnimBlendAssociation.h | 2 | ||||
-rw-r--r-- | src/animation/AnimBlendSequence.h | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/animation/AnimBlendAssocGroup.cpp b/src/animation/AnimBlendAssocGroup.cpp index fbca92b7..05f9a06a 100644 --- a/src/animation/AnimBlendAssocGroup.cpp +++ b/src/animation/AnimBlendAssocGroup.cpp @@ -116,14 +116,13 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name) for(i = 0; i < animBlock->numAnims; i++){ CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i); CBaseModelInfo *model = GetModelFromName(anim->name); + assert(model); printf("Associated anim %s with model %s\n", anim->name, model->GetName()); - if(model){ - RpClump *clump = (RpClump*)model->CreateInstance(); - RpAnimBlendClumpInit(clump); - assocList[i].Init(clump, anim); - RpClumpDestroy(clump); - assocList[i].animId = i; - } + RpClump *clump = (RpClump*)model->CreateInstance(); + RpAnimBlendClumpInit(clump); + assocList[i].Init(clump, anim); + RpClumpDestroy(clump); + assocList[i].animId = i; } numAssociations = animBlock->numAnims; } diff --git a/src/animation/AnimBlendAssociation.h b/src/animation/AnimBlendAssociation.h index a7e127f7..cd61636f 100644 --- a/src/animation/AnimBlendAssociation.h +++ b/src/animation/AnimBlendAssociation.h @@ -77,6 +77,8 @@ public: void UpdateTime(float timeDelta, float relSpeed); bool UpdateBlend(float timeDelta); + void SetRun(void) { flags |= ASSOC_RUNNING; } + inline float GetTimeLeft() { return hierarchy->totalLength - currentTime; } static CAnimBlendAssociation *FromLink(CAnimBlendLink *l) { diff --git a/src/animation/AnimBlendSequence.h b/src/animation/AnimBlendSequence.h index 7538cf56..1246d7b4 100644 --- a/src/animation/AnimBlendSequence.h +++ b/src/animation/AnimBlendSequence.h @@ -1,6 +1,6 @@ #pragma once -#include "math/Quaternion.h" +#include "Quaternion.h" // TODO: put them somewhere else? struct KeyFrame { |