Put the extra animation event in the struct def, also adding Jan's VFS script wrapper.

This was SVN commit r2218.
This commit is contained in:
MarkT
2005-05-03 04:27:07 +00:00
parent d2410624e4
commit c8cd52578a
11 changed files with 133 additions and 26 deletions
+2 -1
View File
@@ -205,7 +205,7 @@ void CModel::CalcAnimatedObjectBound(CSkeletonAnimDef* anim,CBound& result)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// BuildAnimation: load raw animation frame animation from given file, and build a
// animation specific to this model
CSkeletonAnim* CModel::BuildAnimation(const char* filename,float speed,double actionpos)
CSkeletonAnim* CModel::BuildAnimation(const char* filename,float speed,double actionpos,double actionpos2)
{
CSkeletonAnimDef* def=g_SkelAnimMan.GetAnimation(filename);
if (!def) return 0;
@@ -214,6 +214,7 @@ CSkeletonAnim* CModel::BuildAnimation(const char* filename,float speed,double ac
anim->m_AnimDef=def;
anim->m_Speed=speed;
anim->m_ActionPos=(size_t)( actionpos * anim->m_AnimDef->GetDuration() );
anim->m_ActionPos2=(size_t)( actionpos2 * anim->m_AnimDef->GetDuration() );
anim->m_ObjectBounds.SetEmpty();
InvalidateBounds();