- 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
|
|
@ -2916,7 +2916,7 @@ static bool LoadDehSupp ()
|
|||
else
|
||||
{
|
||||
auto cls = PClass::FindActor(sc.String);
|
||||
if (cls == NULL || !cls->IsDescendantOf(PClass::FindActor(NAME_Ammo)))
|
||||
if (cls == NULL || !cls->IsDescendantOf(NAME_Ammo))
|
||||
{
|
||||
sc.ScriptError("Unknown ammo type '%s'", sc.String);
|
||||
}
|
||||
|
|
@ -2934,7 +2934,7 @@ static bool LoadDehSupp ()
|
|||
{
|
||||
sc.MustGetString();
|
||||
PClass *cls = PClass::FindClass(sc.String);
|
||||
if (cls == NULL || !cls->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
|
||||
if (cls == NULL || !cls->IsDescendantOf(NAME_Weapon))
|
||||
{
|
||||
sc.ScriptError("Unknown weapon type '%s'", sc.String);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue