Have SetSecondsIntoAnimation() set the movie position too. Currently, movies can only be rewound, any value other than 0 is ignored.
This commit is contained in:
@@ -741,6 +741,8 @@ float Sprite::GetAnimationLengthSeconds() const
|
|||||||
void Sprite::SetSecondsIntoAnimation( float fSeconds )
|
void Sprite::SetSecondsIntoAnimation( float fSeconds )
|
||||||
{
|
{
|
||||||
SetState( 0 ); // rewind to the first state
|
SetState( 0 ); // rewind to the first state
|
||||||
|
if( m_pTexture )
|
||||||
|
m_pTexture->SetPosition( fSeconds );
|
||||||
m_fSecsIntoState = fSeconds;
|
m_fSecsIntoState = fSeconds;
|
||||||
UpdateAnimationState();
|
UpdateAnimationState();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user