- replaced more dyn_casts and checks for RUNTIME_CLASS(PClassActor)

It is preferable to use IsDescendantOf wherever possible if we ever want to be able to separate PClass from PType.
This commit is contained in:
Christoph Oelckers 2017-04-12 10:20:58 +02:00
commit 9c9b2ccf6d
13 changed files with 28 additions and 23 deletions

View file

@ -120,7 +120,7 @@ PClassActor *FState::StaticFindStateOwner (const FState *state, PClassActor *inf
{
return info;
}
info = dyn_cast<PClassActor>(info->ParentClass);
info = ValidateActor(info->ParentClass);
}
return NULL;
}
@ -739,7 +739,7 @@ FState *FStateDefinitions::ResolveGotoLabel (AActor *actor, PClassActor *mytype,
// superclass, or it may be the name of any class that this one derives from.
if (stricmp (classname, "Super") == 0)
{
type = dyn_cast<PClassActor>(type->ParentClass);
type = ValidateActor(type->ParentClass);
actor = GetDefaultByType(type);
}
else