From 3f873300e290b943aa06878f39fa9781e8ccc04f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 5 Nov 2003 06:43:26 +0000 Subject: [PATCH] UtilCommand BGA fix. Its. --- stepmania/src/ActorUtil.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index a3e2af1629..25b6ef7d19 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -145,19 +145,19 @@ void UtilSetXY( Actor& actor, CString sClassName ) float UtilCommand( Actor& actor, CString sClassName, CString sCommandName ) { - actor.Command( "playcommand," + sCommandName ); + float ret = actor.Command( "playcommand," + sCommandName ); // HACK: It's very often that we command things to TweenOffScreen // that we aren't drawing. We know that an Actor is not being - // used if it's name is blank. So, do nothing on Actors with a blank name. + // used if its name is blank. So, do nothing on Actors with a blank name. // (Do "playcommand" anyway; BGAs often have no name.) if( sCommandName=="Off" ) { if( actor.GetName().empty() ) - return 0; + return ret; } else { ASSERT( !actor.GetName().empty() ); } - return actor.Command( THEME->GetMetric(sClassName,actor.GetName()+sCommandName+"Command") ); + return max( ret, actor.Command( THEME->GetMetric(sClassName,actor.GetName()+sCommandName+"Command") ) ); }