This commit is contained in:
Chris Danford
2006-01-29 22:13:16 +00:00
parent 9c30f918ca
commit 220e204485
+3 -2
View File
@@ -474,9 +474,10 @@ void ActorUtil::LoadAllCommandsFromName( Actor& actor, const RString &sType, con
FOREACHS_CONST( RString, vsValueNames, v ) FOREACHS_CONST( RString, vsValueNames, v )
{ {
const RString &sv = *v; const RString &sv = *v;
if( sv.Right(7) == "Command" ) static RString sEnding = "Command";
if( EndsWith(sv,sEnding) )
{ {
RString sCommandName( sv.begin()+sName.size(), sv.end()-7 ); RString sCommandName( sv.begin()+sName.size(), sv.end()-sEnding.size() );
LoadCommandFromName( actor, sType, sCommandName, sName ); LoadCommandFromName( actor, sType, sCommandName, sName );
} }
} }