- optimized the FName versions of IsDescendantOf and IsKindOf. These can be done without first looking up the class type itself.
This commit is contained in:
parent
31223ca180
commit
a6785afddb
28 changed files with 126 additions and 97 deletions
|
|
@ -246,7 +246,7 @@ static void CheckForUnsafeStates(PClassActor *obj)
|
|||
TMap<FState *, bool> checked;
|
||||
ENamedName *test;
|
||||
|
||||
if (obj->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
|
||||
if (obj->IsDescendantOf(NAME_Weapon))
|
||||
{
|
||||
if (obj->Size == RUNTIME_CLASS(AWeapon)->Size) return; // This class cannot have user variables.
|
||||
test = weaponstates;
|
||||
|
|
@ -336,11 +336,11 @@ static void CheckStates(PClassActor *obj)
|
|||
|
||||
CheckStateLabels(obj, actorstates, SUF_ACTOR, "actor sprites");
|
||||
|
||||
if (obj->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
|
||||
if (obj->IsDescendantOf(NAME_Weapon))
|
||||
{
|
||||
CheckStateLabels(obj, weaponstates, SUF_WEAPON, "weapon sprites");
|
||||
}
|
||||
else if (obj->IsDescendantOf(PClass::FindActor(NAME_CustomInventory)))
|
||||
else if (obj->IsDescendantOf(NAME_CustomInventory))
|
||||
{
|
||||
CheckStateLabels(obj, pickupstates, SUF_ITEM, "CustomInventory state chain");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue