From 6f864d9a6b7bba7d13f7701a69d221dd091a1bd5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 25 Aug 2005 23:03:30 +0000 Subject: [PATCH] LoadAllCommands needs to be called in Init(), not BeginScreen() --- stepmania/src/ActorUtil.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 9f5f5aba30..dc7ed776b1 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -374,6 +374,15 @@ Actor* ActorUtil::MakeActor( const RageTextureID &ID ) void ActorUtil::SetXY( Actor& actor, const CString &sType ) { ASSERT( !actor.GetName().empty() ); + + /* + * Hack: We normally SET_XY in Init(), and run ON_COMMAND in BeginScreen. We + * want to load the actor's commands in Init(), since that takes long enough + * to skip. So, run LoadAllCommands here if it hasn't been run yet. + */ + if( !actor.HasCommand("On") ) // this actor hasn't loaded commands yet + LoadAllCommands( actor, sType ); + actor.SetXY( THEME->GetMetricF(sType,actor.GetName()+"X"), THEME->GetMetricF(sType,actor.GetName()+"Y") ); }