From 287a0933bdcda367aa5e8e28f3b3fb2c4fd97f6a Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 10 Apr 2017 11:58:53 +0300 Subject: [PATCH] Fixed lookup of inventory and ammo types in FraggleScript https://forum.zdoom.org/viewtopic.php?t=55950 --- src/fragglescript/t_func.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 2348448ac5..9e1d95ffde 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -363,7 +363,7 @@ static PClassActor * T_GetAmmo(const svalue_t &t) p=DefAmmo[ammonum]; } auto am = PClass::FindActor(p); - if (am == NULL || !am->IsKindOf(PClass::FindClass(NAME_Ammo))) + if (am == NULL || !am->IsDescendantOf(PClass::FindClass(NAME_Ammo))) { script_error("unknown ammo type : %s", p); return NULL; @@ -2436,7 +2436,7 @@ static void FS_GiveInventory (AActor *actor, const char * type, int amount) type = "BasicArmorPickup"; } auto info = PClass::FindActor (type); - if (info == NULL || !info->IsKindOf(RUNTIME_CLASS(AInventory))) + if (info == NULL || !info->IsDescendantOf(RUNTIME_CLASS(AInventory))) { Printf ("Unknown inventory item: %s\n", type); return;