StartTransitioningCommand

This commit is contained in:
Glenn Maynard
2005-04-15 08:05:10 +00:00
parent 4eae0713c7
commit 215ce5ad21
+10
View File
@@ -6,6 +6,15 @@
#include "RageFile.h"
/*
* XXX: We send OnCommand on load, then we send no updates until we get
* StartTransitioning. Historically, this was fine, but it's incorrect now
* that commands can have arbitrary side-effects. We should only send OnCommand
* when we get StartTransitioning, but we need to run it early to set m_fLengthSeconds.
* Eventually, phase out GetLengthSeconds (ScreenGameplay is somewhat tricky). For
* now, play a "StartTransitioning" command; put anything that has side-effects in
* there, instead.
*/
Transition::Transition()
{
m_State = waiting;
@@ -94,6 +103,7 @@ void Transition::StartTransitioning( ScreenMessage send_when_done )
{
if( m_State != waiting )
return; // ignore
m_sprTransition->PlayCommand( "StartTransitioning" );
m_MessageToSendWhenDone = send_when_done;
m_State = transitioning;