- added runtime checks for the state usage flags.
This commit is contained in:
parent
4f998fa879
commit
647e1399f1
4 changed files with 26 additions and 0 deletions
|
|
@ -626,6 +626,14 @@ bool AActor::SetState (FState *newstate, bool nofunction)
|
|||
{
|
||||
prevsprite = -1;
|
||||
}
|
||||
if (!(newstate->UseFlags & SUF_ACTOR))
|
||||
{
|
||||
auto so = FState::StaticFindStateOwner(newstate);
|
||||
Printf("State %s.%d in %s not flagged for use as an actor sprite\n", so->TypeName.GetChars(), int(newstate - so->OwnedStates), GetClass()->TypeName.GetChars());
|
||||
state = nullptr;
|
||||
Destroy();
|
||||
return false;
|
||||
}
|
||||
state = newstate;
|
||||
tics = GetTics(newstate);
|
||||
renderflags = (renderflags & ~RF_FULLBRIGHT) | ActorRenderFlags::FromInt (newstate->GetFullbright());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue