- 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:
Christoph Oelckers 2017-02-08 15:47:22 +01:00
commit a6785afddb
28 changed files with 126 additions and 97 deletions

View file

@ -263,7 +263,7 @@ void InitBotStuff()
for(unsigned i=0;i<sizeof(botinits)/sizeof(botinits[0]);i++)
{
const PClass *cls = PClass::FindClass(botinits[i].type);
if (cls != NULL && cls->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
if (cls != NULL && cls->IsDescendantOf(NAME_Weapon))
{
AWeapon *w = (AWeapon*)GetDefaultByType(cls);
if (w != NULL)