- 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

@ -1331,7 +1331,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
{
if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AInventory)))
{
if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
if (reply->GiveType->IsDescendantOf(NAME_Weapon))
{
if (player->mo->FindInventory(reply->GiveType) != NULL)
{
@ -1357,7 +1357,7 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
}
}
if (reply->GiveType->IsDescendantOf(PClass::FindActor("SlideshowStarter")))
if (reply->GiveType->IsDescendantOf("SlideshowStarter"))
gameaction = ga_slideshow;
}
else