mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
Fixed lookup of inventory and ammo types in FraggleScript
https://forum.zdoom.org/viewtopic.php?t=55950
This commit is contained in:
parent
b0a0c62af1
commit
287a0933bd
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue