- print a warning when a state label can't be found. Preferably this would be an error but the oversight had been in the engine for too long so nobody knows

This commit is contained in:
Christoph Oelckers 2014-10-25 12:33:08 +02:00
parent ef5707d73b
commit dcc318fdee

View file

@ -39,6 +39,7 @@
#include "cmdlib.h"
#include "i_system.h"
#include "c_dispatch.h"
#include "v_text.h"
#include "thingdef/thingdef.h"
// Each state is owned by an actor. Actors can own any number of
@ -699,6 +700,10 @@ FState *FStateDefinitions::ResolveGotoLabel (AActor *actor, const PClass *mytype
{
I_Error ("Attempt to get invalid state %s from actor %s.", label, type->TypeName.GetChars());
}
else
{
Printf (TEXTCOLOR_RED "Attempt to get invalid state %s from actor %s.\n", label, type->TypeName.GetChars());
}
delete[] namestart; // free the allocated string buffer
return state;
}