Changed PlayCommandNoRecurse to check whether the command is nil before running it, so that a command metric set to a nil function isn't an error. Removed TextBannerHighScores::AfterSetCommand metric from _fallback because it pointed to a function that does not exist.

This commit is contained in:
Kyzentun Keeslala
2015-10-22 12:24:04 -06:00
parent add09bef07
commit 189cf77cab
2 changed files with 3 additions and 2 deletions
+3 -1
View File
@@ -1465,8 +1465,10 @@ void Actor::HandleMessage( const Message &msg )
void Actor::PlayCommandNoRecurse( const Message &msg )
{
const apActorCommands *pCmd = GetCommand( msg.GetName() );
if( pCmd != NULL )
if(pCmd != NULL && (*pCmd)->IsSet() && !(*pCmd)->IsNil())
{
RunCommands( *pCmd, &msg.GetParamTable() );
}
}
void Actor::PushContext( lua_State *L )