From dcc318fdee62eec607978a8864c780ec4575ab62 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 25 Oct 2014 12:33:08 +0200 Subject: [PATCH] - 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 --- src/p_states.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/p_states.cpp b/src/p_states.cpp index cfe455716..3ba0ae14f 100644 --- a/src/p_states.cpp +++ b/src/p_states.cpp @@ -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; }