Skip to content

Commit

Permalink
Definitions: Warn if the next state of a state is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jan 31, 2020
1 parent ca686ea commit bb2a4d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/apps/client/src/def_main.cpp
Expand Up @@ -1248,6 +1248,12 @@ void Def_Read()
st->action = P_GetAction(dst.gets("action"));
st->nextState = defs.getStateNum(dst.gets("nextState"));

if (st->nextState == -1)
{
LOG_WARNING("State \"%s\": next state \"%s\" is not defined") << dst.gets("id")
<< dst.gets("nextState");
}

auto const &misc = dst.geta("misc");
for (dint k = 0; k < NUM_STATE_MISC; ++k)
{
Expand Down

0 comments on commit bb2a4d7

Please sign in to comment.