This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -477,9 +477,7 @@ void MOSprite::Update()
477
477
if (m_SpriteAnimTimer.GetElapsedSimTimeMS () > (m_SpriteAnimDuration / m_FrameCount))
478
478
{
479
479
// Quick switch to other frame if only two
480
- if (m_FrameCount == 2 )
481
- m_Frame = m_Frame == 0 ? 1 : 0 ;
482
- else
480
+ if (m_FrameCount == 2 ) { m_SpriteAnimMode = ALWAYSLOOP; }
483
481
{
484
482
int prevFrame = m_Frame;
485
483
// Keep trying ot find a new frame
@@ -494,6 +492,7 @@ void MOSprite::Update()
494
492
}
495
493
else if (m_SpriteAnimMode == ALWAYSPINGPONG)
496
494
{
495
+ if (m_FrameCount == 2 ) { m_SpriteAnimMode = ALWAYSLOOP; }
497
496
int realFrameCount = m_FrameCount - 1 ;
498
497
float perFrameTime = ((m_SpriteAnimDuration / m_FrameCount) / 2 );
499
498
if (m_SpriteAnimTimer.IsPastSimMS (perFrameTime))
Original file line number Diff line number Diff line change @@ -587,16 +587,14 @@ ENTITYALLOCATION(MOSprite)
587
587
virtual void SetSpriteAnimDuration (int newDuration) { m_SpriteAnimDuration = newDuration; }
588
588
589
589
590
- /*
591
590
// ////////////////////////////////////////////////////////////////////////////////////////
592
591
// Virtual method: Update
593
592
// ////////////////////////////////////////////////////////////////////////////////////////
594
593
// Description: Updates this MovableObject. Supposed to be done every frame.
595
594
// Arguments: None.
596
595
// Return value: None.
597
596
598
- virtual void Update() = 0;
599
- */
597
+ virtual void Update ();
600
598
601
599
602
600
// ////////////////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments