fix OnCommand sometimes run twice
This commit is contained in:
@@ -63,6 +63,17 @@ bool Transition::EarlyAbortDraw() const
|
||||
return m_State == waiting;
|
||||
}
|
||||
|
||||
/* Our parent might send us OnCommand. We do that ourself, because
|
||||
* we sometimes want to know GetLengthSeconds before StartTransitioning.
|
||||
* Make sure we don't process OnCommand twice. */
|
||||
void Transition::PlayCommand( const CString &sCommandName, Actor *pParent )
|
||||
{
|
||||
if( sCommandName == "On" )
|
||||
return;
|
||||
|
||||
ActorFrame::PlayCommand( sCommandName, pParent );
|
||||
}
|
||||
|
||||
void Transition::StartTransitioning( ScreenMessage send_when_done )
|
||||
{
|
||||
if( m_State != waiting )
|
||||
|
||||
Reference in New Issue
Block a user