From c37de6424ac7016d24fec8d700c7bef5e006dfbf Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 7 Feb 2005 04:02:38 +0000 Subject: [PATCH] cleanup. Change2DAnimState only sets a variable, and nothing else ever changes it, so there's no harm in sending the same value repeatedly. --- stepmania/src/ScreenGameplay.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 9b8d90b0ac..ad5ec79870 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1456,12 +1456,9 @@ void ScreenGameplay::Update( float fDeltaTime ) // FOREACH_EnabledPlayer(p) { - if(m_Background.GetDancingCharacters() != NULL) - { - if(m_Player[p].GetDancingCharacterState() != AS2D_IGNORE) // grab the state of play from player and update the character - m_Background.GetDancingCharacters()->Change2DAnimState(p,m_Player[p].GetDancingCharacterState()); - m_Player[p].SetCharacterState(AS2D_IGNORE); // set to ignore as we've already grabbed the latest change - } + DancingCharacters *pCharacter = m_Background.GetDancingCharacters(); + if( pCharacter != NULL ) + pCharacter->Change2DAnimState( p, m_Player[p].GetDancingCharacterState() ); } //