- fixed redundant reallocation of constructable meta fields.

- some optimization of access to OwnedStates in old DECORATE.
- consolidate all places that print a state name into a subfunction.
- allocate states from the ClassDataAllocator memory arena. States do not need to be freed separately from the rest of the static class data.
This commit is contained in:
Christoph Oelckers 2017-04-11 21:48:41 +02:00
commit 05240ccbe5
10 changed files with 106 additions and 85 deletions

View file

@ -632,8 +632,7 @@ bool AActor::SetState (FState *newstate, bool nofunction)
}
if (!(newstate->UseFlags & SUF_ACTOR))
{
auto so = FState::StaticFindStateOwner(newstate);
Printf(TEXTCOLOR_RED "State %s.%d in %s not flagged for use as an actor sprite\n", so->TypeName.GetChars(), int(newstate - so->OwnedStates), GetClass()->TypeName.GetChars());
Printf(TEXTCOLOR_RED "State %s in %s not flagged for use as an actor sprite\n", FState::StaticGetStateName(newstate), GetClass()->TypeName.GetChars());
state = nullptr;
Destroy();
return false;